So, as a complete noob with stuff like Forth and other concatenative stuff, can someone explain why they'd use it, and how something like Avelon would be cool?
I've read a bit about being able to avoid generating garbage, but I have to admit a bit of ignorance to what that actually means.
The build-up-from-little-pieces style of Forth meets the terseness of the APL family in this functional, programming language. That's my impression. I don't use any of those, though. I recognize author from Lambda the Ultimate. I emailed him to see if he wants to tell us more about this.
Concatenative just means that concatenating two programs yields a new program and that is the major method of program construction. Most Forth dialects also support variables, gotos and procedures; but it's all in a concatenative way.
I suppose if you squint a bit, any push-jump-ret-pop sequence is concatenative - but I'm not sure if I agree that the main way to go from a few general assembly language programs that each read from a file, count words, and sums integers - to a program that counts words in a file is to simply concatenate them?
Assembly is pretty esoteric these days... I mean, most every platform no matter how resource constrained has at least a C compiler, and must of 'em probably have a Python interpreter.
15 comments
[ 4.6 ms ] story [ 43.8 ms ] threadI've read a bit about being able to avoid generating garbage, but I have to admit a bit of ignorance to what that actually means.
[Factor]: https://factorcode.org/
Are most? I've always considered them more procedural than anything else. Variables and gotos.
I suppose if you squint a bit, any push-jump-ret-pop sequence is concatenative - but I'm not sure if I agree that the main way to go from a few general assembly language programs that each read from a file, count words, and sums integers - to a program that counts words in a file is to simply concatenate them?
[1] https://en.wikipedia.org/wiki/Joy_(programming_language)