Re: [stack] Re: the concatenative wikipedia article

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Dec 31, 2008, at 6:01 PM, Adam wrote:

> Slava recently created a nice description of Concatenative languages
> in the following four articles

Thanks, I had hadn't seen that before.

Slava's description seems decent enough. It is, however, stack- 
focused. He says that concatenative languages and stack-based  
languages are similar, but then never clarifies the differences and  
goes on to conflate the two. I also have some minor niggles (in no  
particular order):

1. There's no reason a concatenative language has to support  
recursion. My initial version of 5th did not.
2. Not all concatenative languages have multiple programmer-accessible  
stacks. Forth and Factor do, Joy and Cat do not.
3. It isn't mentioned that the reduction of a function the  
transformation of one function to another. This is the critical thing  
I find lacking in FP and FL.
4. It says composition must be denoted by concatenation. I'd prefer to  
say that some sort of concatenation operator is the primary means of  
forming programs, be that operator whitespace, a dot, etc.
5. Quotation works quite differently in Factor and Joy compared to  
Cat. In Cat, quotation is an abstraction mechanism (as Chris has  
pointed out to me). In Factor and Joy, it is not. It is therefore not  
accurate to say a quotation is a sequence of objects.
6. There's no reason that only one stack be live at any given point.  
Joy's persistent stack semantics allow for parallel evaluation.  
Ignoring IO, you can reduce programs using rewrite rules applied in  
any order and/or simultaneously.
7. It it said that "literals are pushed onto the stack when  
encountered by the evaluator". This implies that '5' is an object, not  
a function, which I think is a less useful (and likely inaccurate)  
characterization.

- John
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.