33
bjForth v0.0.3 is out!
(github.com)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
Forth is stackier.
Yeah that's what I meant with syntactically. You could act as if in Lisp arguments to functions are pushing on the stack, and functions are removing them and pushing the result back.
In Forth, though, the number of results pushed to the stack after an execution of a word could be a function of the input rather than a single value or even a fixed number of values.
Likewise, the number of arguments that a word pops from the stack could be a function of a value pushed earlier to the stack.
That's what macros are and let you do in Lisp
Perhaps you could explain exactly what you mean?
If you don't know Lisp, it'd probably take too long for me explain (i.e. I don't want to). Basically, macros let you rewrite your code arbitrarily, which would have the same effect as arbitrarily modifying the stack.
You are making the extremely incorrect presumption that I am unfamiliar with Lisp and how macros work. What is unclear to me is how you specifically think that arbitrarily rewriting code at macro expansion time is exactly equivalent to arbitrarily manipulating the stack at runtime.