Re: [stack] Advantages of cat, joy ..?

John Nowak <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
On Feb 24, 2009, at 5:08 PM, John Nowak wrote:

Minor corrections, sorry.

> This  is because the entire state of the program is passed to every  
> function
> and you need to "tell" the cleave how many items it cases about.

That should be "cares about". In other words, you need cleave,  
2cleave, 3cleave, etc in Joy. You don't need this in FP.

> (Note that Backus's FP is a different here: '~1' denotes the function
> that returns the value 1 and '1' denotes the value one. I dislike this
> as it is incompatible with the property of concatenative languages
> where the simplification of a function is another function. This is
> why I've adopted the approach of having '1' represent a constant
> function.)

Simplification is the wrong word here. I really mean a partial  
reduction or something to that effect. For example, in Joy, the  
function '1 2 + 3 +' can be partially reduced to the function '3 3 +'.  
The small change I'm making to the syntax of FP ensures this same sort  
of property holds there as well. For example, the function '+[+[1, 2],  
3]' can be partially reduced to the function '+[3, 3]', which can then  
be further reduced to the function '6'.

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