Re: [stack] disallowing recursive definitions
Don Groves <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
On Mar 3, 2008, at 19:50 , William Tanksley, Jr wrote: > John Cowan <[email protected]> wrote: >> William Tanksley, Jr scripsit: >>> Now, interestingly, a concatenative tail-call cannot do this. Does >>> this imply some superiority for concatenative optimizers? :-) > > I'll reply to both of your messages in one. > >> No. All you do is do an arbitrary stack shuffle before the tail >> call. > > Then the analysis difficulty (if there is any) is obviously in the > shuffle, not in the tail-call. The analytical problem with an > applicative tail-call is that the 'shuffle' happens at the same time > as the call. > >> With a concatenative tail-call you're passing the stack as an >> argument. In other words, you pass the entire state of the program! > > Yes, this is how concatenative languages are modeled. That's how > *every* step in their execution is modeled, not just tail-calls or > calls. If this were a problem, concatenative languages would be > universally problematic, not merely problematic in the presence of > tail-calls. A few months back, I finally caught on to this: by their nature, concatenative languages enforce computation by continuation passing. Would it be true to say there is no other way? -- don > >> John Cowan http://www.ccil.org/~cowan [email protected] > > -Wm > > > > Yahoo! Groups Links > > > >