Re: [stack] sweetening concatenative syntax
Manfred Von Thun <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <C4071D75.F92%[email protected]> |
On 8/3/08 2:40 AM, "Christopher Diggins" <[email protected]> wrote: > On Fri, Mar 7, 2008 at 10:11 AM, Stevan Apter <[email protected] > <mailto:sa%40nsl.com> > wrote: > >> > ----- Original Message ----- >> > From: "John Nowak" <[email protected] <mailto:john%40johnnowak.com> > >> > To: <[email protected] <mailto:concatenative%40yahoogroups.com> > > > .... >>> > > Ah, I think maybe there's some confusion here over what we mean by >>> > > "list". (Yes, really!) In Joy, lists, stacks, and functions are all >>> > > magically the same thing. I assume it's similar in XY as well. In >>> > > Fifth, lists, stacks, and functions are all different things. This is >>> > > just one more example of the endless complication that types introduce. > In Joy, stacks, list, and quotations are the same thing. A mathematician would tell you that a set is a truth function, giving truth for its members and falsity for everything else. They would also tell you that a sequence (list,vector,array...) is a function from an initial portion of the positive natural numbers (1 2 3 ...) to its members, and undefined beyond that (all this is done by the indexing function, of course). But function can have all sorts of things as argument(s) and give all sorts of things as value. But don¹t confuse functions with programs that compute them. [My favourite example: there is just one doubling function, and there many programs that compute it: 1: (add the argument to itself), 2: (multiply the argument by 2), 3: (leftshift its binary representation by 1) 4: (lots more)] So a quotation in Joy is NOT a function, it is a program to compute a function. - Manfred [Non-text portions of this message have been removed]