3 ms·
So called concatenative language is also a combinator-oriented language in a somewhat restricted form. Here are some historic examples of combinator-oriented la
by richard_shelton 8y ago
So called concatenative language is also a combinator-oriented language in a somewhat restricted form. Here are some historic examples of combinator-oriented languages: APL family and Backus's FP/FL (direct inspiration for the author of Joy). The fact that you denote composition of the functions with a white spaces is just a syntactic sugar. In the case of combinator-oriented language you work with various functional forms -- combinators, not just with composition, so you need to use more symbols to denote that. And in practice it's hard to find a concatenative language which would be used seriously, not just in a few hobby projects. In the same time there are impressive examples of modern combinator-oriented languages like Faust [1] and Spiral [2].
Still, the whole "concatenative" movement is interesting as a try to formalize the semantics and "improve" Forth language. See also Postscript and Henry Backer's articles [3].
[1] http://faust.grame.fr/ http://faust.grame.fr/
[2] http://www.spiral.net/ http://www.spiral.net/
[3] http://home.pipeline.com/~hbaker1/ForthStack.html http://home.pipeline.com/~hbaker1/ForthStack.html
- deleted 8y ago[deleted]
- baruchel 8y ago> And in practice it's hard to find a concatenative language which would be used seriously, not just in a few hobby projects. One could argue that piping commands in the shell is a very serious use of concatenative syntax.
- richard_shelton 8y agoIn a general sense, yes, of course. Here are more examples. 1. BNF notation. Yes, it could be surprising, but in a BNF-like language we use function-level representation and white spaces here denote sequential composition of functions -- nonterminals. 2. In a some Lisp-like language one may use spaces to describe "abstract" composition. So, for sequential composition: "(seq func1 func2 func3)". And for parallel composition, for example: "(par func1 func2 func3)". But in the case of real concatenative programming, which has its origin in Forth, you mostly deal with stacks and stack machines.