lua-users home
lua-l archive

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


On Tuesday 22 February 2011 13:17:00 Pierre-Yves Gérardy wrote:
> > 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.

This would be my guess also.
> 
> 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.

Yes. Any fool can use goto. Anyone in the business before 1985 has been forced 
to deal with goto and understands on a gut level its horrors. As for myself, I 
was TAUGHT to use gotos in college, along with that perverse matching design 
tool, the flowchart. I was a terrible programmer. I wasn't able to become a 
professional programmer until discovering return from subroutine and 
functional decomposition in 1982.

> 
> 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.

I disagree. To paraphrase PT Barnum, there's an idiot born every minute.

:-)

SteveT

Steve Litt
Recession Relief Package
http://www.recession-relief.US
Twitter: http://www.twitter.com/stevelitt