Re: [stack] Advantages of cat, joy ..?
William Tanksley <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <1237843750.5276.10.camel@tanksley> |
John Nowak wrote: > William Tanksley wrote: > > This is the big thing I don't > > like about stack-copying behavior... Aside from the fact that > > implementing it without an immutable stack is _hard_, it also assumes > > the output for every operation is a single value at the top of the > > stack. > This may be a source of some confusion for us. If your programming > language is typed (or requires that all functions have inferable stack > effects), you don't need to use a stack in the implementation *at > all*. Accordingly, you certainly never need to copy it. There's no > efficiency penalty or implementation difficulty for something like the > banana combinator in this situation. You're right in that I shouldn't have said "immutable stack". I don't think that need be a source of confusion, because it's true that "stack copying" behavior always introduces complexity, whether or not the underlying implementation actually involves a stack. If your stack is only a bookkeeping notion, then your bookkeeping is going to get a little more complicated. > I'm calling this current "concatenative FP" thing "Forthus". It has > the concatenative elements of Forth and the ideas of John Backus. > Back. Forth. Backus. Forthus. You get it. I like it. I definitely look forward to reading more about it when it's ready for that. > - John -Wm