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: > > Seriously, I'm confused. Why did you start your paragraph with "no," > > if you weren't intending to disagree with me? This probably all comes > > down to miscommunication again... > I can no longer fully sort this out, but your remark ended with a smiley, > so I assumed it was ironic, and was answering (seriously) that the ironic > statement was wrong, meaning that what I took to be your underlying actual > opinion was correct. I consider this fully sorted out. Excellent. The problem is that I failed to explain precisely why I said what I did, leaving you having to wonder whether I was being deep and ironic or just shallow and obvious. Your reading makes perfect sense. > In any case, a tail-call in a concatenative language is a possible stack > reshuffle to get the arguments in the correct order for the new function > and then a GO TO to that function, which is essentially how it's implemented > in tail-recursive applicative languages like Scheme: you shuffle the arguments > about in registers, possibly spilling to the stack or restoring from the stack > as needed, and then do a machine-language GO TO. > Assembler: the ultimate concatenative language.... This isn't a useful way to compare languages -- yes, they can all generate machine code, and given a hypothetical optimizer it'll be the same for the same semantics. Well, it'll be useful if you can specify what that optimizer looks like. A tail call in a concatenative language is a structured GOTO to the beginning of the function, nothing more. A tail call in an applicative function is a parameter reassignment combined with a structured GOTO to the beginning of the function. > After fixing the Y2K bug in an application: John Cowan -Wm