Re: [stack] the concatenative wikipedia article

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Dec 31, 2008, at 8:56 PM, William Tanksley, Jr wrote:

> John Nowak <[email protected]> wrote:
>>
>
>> 1. 'f g' denotes the composition of 'f' and 'g'
>> 2. 'f g h' denotes the composition of 'g' with the construction of  
>> 'f'
>> and 'h' (construction is basically a cleave combinator)
>> 3. Grouping is to the right such that 'f g h i j k == f g (h i (j  
>> k))'
>> 4. Composition is associative such that '(f g) h == f (g h)'
>>
>> So, is this concatenative? It's just composition and cleave  
>> combinators.
>
> As I see it, no. The problem is that grouping is semantically
> significant (rule 3), but not syntactically significant (rules 1&2).
> It violates my rule that a concatenative language must have
> associative semantics and syntax -- that means no required implicit
> grouping.

So if I got rid of rules 2 and 3, would it be concatenative? It would  
have the same underlying semantics except concatenation is would  
always mean composition.

This:

    (sq b) - 4 * a * c

Would be written like this instead:

    - [sq b, * [4, * [a, c]]]

If your answer is yes, my problem with that is that we don't impose  
the same syntactic restrictions on the definition of an applicative  
language. Tons of syntaxes are employed (Lisp, Haskell, J, FP, etc),  
yet we still call them all applicative. Perhaps concatenative isn't  
the right term, but I'd very much like a term focused strictly on  
semantics like "applicative" is. Again, "compositional" or similar  
seems like the obvious choice with "concatenative" being a subset  
defined partially by its syntax.

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