5 ms·
> The language has the equivalent of GOTO Common Lisp does not have the "equivalent of GOTO," it has GOTO. I don't know why you think that is a bad thing.
by sedachv 8y ago
> The language has the equivalent of GOTO
Common Lisp does not have the "equivalent of GOTO," it has GOTO. I don't know why you think that is a bad thing.
- kazinator 8y ago"equivalent of goto" is meaningless; there is no one single conception of goto. The ultimate goto is a jump instruction in the machine language. Even these are not all the same; some have more constraints than others. Machine language goto will typically go from one function into another; the C goto will not. CL's go operator is a mechanism for abandoning the currently executing form up to just below an enclosing tagbody or prog, subsesquent to which, another subform of that tagbody/prog is selected for evaluation, identified by the label that was specified the go form. The initial abandonment of the original form a non-local dynamic control transfer, with all the unwinding that implies. Then the final transfer to another form resembles an unconditional branch. CL go will jump between function activations. A tagbody that has not itself terminated yet can be re-entered by means of a lexical closure. A jump out of that closure is possible.