Re: [stack] Advantages of cat, joy ..?
Stevan Apter <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
howzabout writing up a spec for your proposed language? it would be handy to have it all in a single doc, instead of spread over several weeks of emails. i thought you'd written up a wiki somewhere, but i haven't been able to locate it. ----- Original Message ----- From: "John Nowak" <[email protected]> To: <[email protected]> Sent: Tuesday, February 24, 2009 5:20 PM Subject: Re: [stack] Advantages of cat, joy ..? > > 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 >