Re: [stack] disallowing recursive definitions
"William Tanksley, Jr" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
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. > John Cowan http://www.ccil.org/~cowan [email protected] -Wm