Re: [stack] function/object ambiguity + quotation alternative
John Nowak <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Feb 26, 2009, at 3:11 PM, Stevan Apter wrote: >>> the evaluator would not abide naked functions on the stack; it >>> would apply repeatedly until that was not the case. >> >> Then you have a first order language. I don't really see what that >> >> buys you. Why not allow functions on the stack? It seems to me that >> higher-order languages are only a positive thing. Joy and its ilk are >> only interesting to me because they allow functions on the stack. > > i don't disagree. You should disagree unless you're suggesting that '5 [dup]' evaluate to '5 5'. Are you? I wasn't under the impression that you meant to make that point. If you weren't suggesting that, the language would remain higher-order. > so in cat, what's on the stack after evaluating [dup]first? This is not possible in Cat because quotations are not manipulatable as such. This is necessary to preserve extensionality (e.g. '[1 2 drop] == [1]') and to allow the language to be typed. - John