In article <·····················@stout.bbn.com>,
Ken Anderson <········@stout.bbn.com> wrote:
>However, since a tail call is just a "goto with arguments", haven't i just
>gone back to programming with goto's? What to do?
By your reasoning, *all* function calls are a problem, since they're all
just "push arguments, save PC, goto". A tail call is the same, except
without the "save PC" step. Furthermore, all high-level control constructs
are just variants of goto (e.g. if-then-else is just conditional goto).
The point isn't whether it translates to a goto in the generated code. The
important thing is whether the control construct embodies a higher-level
abstraction. In the case of a tail call, it has the same abstract behavior
as any other function call.
--
Barry Margolin
BBN PlaNET Corporation, Cambridge, MA
······@bbnplanet.com
Phone (617) 873-3126 - Fax (617) 873-6351