Re: [stack] What does "concatenative" actually mean?

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Mar 6, 2009, at 3:19 AM, spir wrote:

> I would say that quotation is one aspect, or level, or kind, of meta- 
> programming.

They're just a way of pushing first-class functions onto a stack.

> Can a concatenative language live without quotations?

Yes: Forth.
See also: http://www.latrobe.edu.au/philosophy/phimvt/joy/jp-flatjoy.html

> There is something I do not understand. It seems that literal code  
> and word names inside quoting marks are both called quotations:
>
> 	[1 2 3] [dup *] map
>
> 	:square dup *
> 	[1 2 3] [square] map
>
> Isn't there a worthful distinction here?

No. [dup *] and [square] both push a first-class function onto the  
stack. If you do not allow functions to access things inside a  
quotation (as in Cat), '[dup *]' and '[square]' are the same function.

> The first one looks a bit like lambdas, no ?

No. There's no form of abstraction involved.

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