lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> roberto> It always strike me why gotos are considered evil and ugly,
> roberto> but continuations, which are a completely unrestricted form
> roberto> of computed/assigned gotos, are considered beautiful. Maybe
> roberto> the problem with gotos is that they are too restrictive?

I think that the problem is social, not technical.

Continuations are conceptually more complex, and as such are less
likely to be abused by clueless people.

The "considered evil" essay was necessary in its time because, outside
accademia, goto was the dominant branching construct, ingrained in
programming habits, and this was causing damage. Continuations never
were popular enough to warrant such a rant.

By now, good practice are taught from day one, so I think that the
Dijstra ban of the goto statement from structured languages and their
descendants could be lifted without harm.

-- Pierre-Yves