4 ms·
I was not aware of this, thanks for giving me an explanation. I don't have any experience writing in forth, my friend described this type of language to me and
by ret2pop 3y ago
I was not aware of this, thanks for giving me an explanation. I don't have any experience writing in forth, my friend described this type of language to me and I implemented it.
- klyrs 3y agoYour language is really neat, thanks for putting it out there
- ret2pop 3y agoHey thanks! I didn't think people would actually care about this lol
- crq-yml 3y agoYou should go implement the FORTH-83 wordlist. (arbitrary pick, but it's easy to find documentation for the words) Doing that will reveal exactly how powerful and succinct Forth has always been, because the compilation/execution distinction in Forth is just a bitflip.
- ret2pop 3y agoyes, i have actually thought about this solution independently, but i still find it a little bit ugly to have to tell the parser that everything past a certain point is runtime, if I am understanding this correctly.
- MaxBarraclough 3y agoSome related goodness from Forth: there's another word, :NONAME, for defining anonymous words. [0][1] The more common : word enters the newly defined word into the dictionary, which is Forth speak for the newly defined word now being considered 'in scope'. The :NONAME word instead returns an execution token on the stack, which is analogous to a function pointer. See also [2], on Forth's execution model more broadly. [0] https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Anonymous-Definitions.html https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/Ano... [1] http://lars.nocrew.org/forth2012/core/ColonNONAME.html http://lars.nocrew.org/forth2012/core/ColonNONAME.html [2] https://www.forth.com/starting-forth/9-forth-execution/ https://www.forth.com/starting-forth/9-forth-execution/