Joe Marshall <eval.apply@gmail.com> wrote:
+---------------
| The problem with goto is that it is too weak a construct: You can't
| pass arguments along with it, so you have to stick the arguments in some
| shared location so the code at the destination can find them again.
| Once you add in the ability to pass arguments (with function calls),
| you can map all control transfer to GOTO.
+---------------
Exactly this point was made by Steele & Sussman in a number of
the early "Lambda Papers" -- "Lambda: The Ultimate Imperative",
perhaps, or maybe "Debunking the 'Expensive Procedure Call'
Myth, or, Procedure Call Implementations Considered Harmful,
or, Lambda: The Ultimate GOTO", and certainly in "Compiler
Optimization Based on Viewing LAMBDA as RENAME + GOTO" -- in
which it was observed [that in a tail-call-optimizing environment]
that a [tail] procedure call is "just" a GOTO that binds its
arguments to variables at the destination [the target of the GOTO].
+---------------
| Personally, I think GOTO (in its more powerful form) is one
| of the best concepts in computer science.
+---------------
Heady stuff indeed.
+---------------
| The weak form where you just pass control is a bit nasty, though.
+---------------
(*Boo!*) (*Hiss!*) ;-}
-Rob
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607