Re:Less is more: language features
by derefr on Monday April 13, 2015 @09:36PM
(#9371583)
No you don't. A GOTO allows you to GOTO a location that isn't valid code—for example, the middle of a multibyte instruction. A tail call does not. That's what the article meant by "disallowing invalid code": a GOTO is strictly equivalent to a tail call, except for all the extra invalid things a GOTO also allows you to do.
[ Parent
| on HN ]
Not really. Machine language jumps can do that sort of nasty stuff but usually gotos are restricted to more well-behaved labels.
That said, gotos are still much less structured than tail calls. You can make some much more spaghetti-like control flow patterns and you are also encouraged to use shared mutable variables instead of passing parameters by value.