Re: [stack] are concatenative languages applicative?
Don Groves <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Apr 24, 2008, at 6:58 PM, Don Groves wrote: > On Apr 24, 2008, at 3:10 PM, John Nowak wrote: > >> Apologies for starting a new thread of sorts, but the "Object Cat" >> thread already had run through three or four different topics, and it >> seems like a good idea to discuss this in such a way that it'll be >> archived properly. I'd really like an answer here. >> >> First off, let me say that I'm not particularly interested in if >> Joy's >> 'i' is an 'eval'. This does, as Chris pointed out, seem to get us >> bogged down in implementation details. As far as I can tell, 'eval' >> is >> defined to be some procedure that works on code, be that code a >> string >> or some more structured form of data. In a language like Cat, there's >> no such code being passed around as there is in Joy, and I don't >> think >> there's anyone here who would say Cat isn't concatenative. >> >> What I'm interested in is this "dequotation" rule: >> >> [$A] i == $A >> >> In other words, these are all equivalent: >> >> 1 2 [3 * *] i == 1 2 3 * * == 1 [2 3] i [* *] i >> >> An important thing to note here is that this translation is just a >> rewriting of function-level code. '$A' is a function, not a value. >> This seems fundamentally different from this rule in the combinatory >> calculus, where 'x' is a *value*, not a function: >> >> (I x) == x >> >> (William already has said essentially the same thing with respect to >> operators and operands.) >> >> I guess my questions are as follows: Are concatenative languages >> applicative, and if so, what's the equivalent of '[$A] i == $A' in >> the >> lambda calculus? > > As I understand it, the lambda calculus form \X.E represents an > abstraction > (\X) and an application (E). Seems to me a straightforward reading of > Joy's > [foo] as an abstraction and i as being/causing an application is the > equivalence > you seek. Joy's i and lambda calculus' dot perform the same function > in their > respective languages. > > Am I the only one here who thinks the word "function" has too many > meanings? > -- > don I didn't finish answering your question: The lambda calculus equivalent of [$A] i is \A.S where S is the stack. -- don > > > >> ...If such a translation cannot be given, does that mean >> concatenative languages are non-applicative? If so, is there another >> term besides "concatenative" that can be used to describe their >> properties? >> >> - John > > > > ------------------------------------ > > Yahoo! Groups Links > > > >