Re: [stack] are concatenative languages applicative?

"Robbert van Dalen" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
> The details of the rewriting
> will depend on the syntax of the functional language. For a
> concatenative language, here is a (crazy, but correct) algorithm
> for rewriting an expression in the language, using several clerical
> workers concurrently:
> >
> REPEAT:
>     The workers at random select an operator in the expression.
>     If it is immediately preceded by the appropriate number of
>     operands, replace the operands and the operator by a value.
>     (For example, (... 2  3 +  ...) is replaced by (... 5 ...).)
> UNTIL there are no more operators in the expression
> >
> This is a way of implementing any concatenative language, even
> if crazy. The usual stack implementation of concatenative languages
> is just an efficient way of finding operators that are immediately
> preceded by their operands.

This possibility to do concurrent rewritings of expressions is the
sole reason why Enchilada has postfix syntax. Therefor I would claim
it isn't crazy at all :)

- Robbert.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.