

The Joke Is On Us: How Ruby 1.9 Supports the Goto Statement - nonrecursive
http://patshaughnessy.net/2012/2/29/the-joke-is-on-us-how-ruby-1-9-supports-the-goto-statement

======
comice
"The goto statement is one of the most infamous and troublesome features of
old, archaic languages like Fortran."

"It allowed programmers to quickly create spaghetti code that was confusing
and impossible to understand"

C still supports goto, and it does have its place. It can actually make code
more readable.

But Linus Torvalds, Robert Love, Rik van Riel and many others make the point
much better than I ever can. Argue with them if you like:

<http://kerneltrap.org/node/553/2131>

------
NameNickHN
All those different languages might support the goto statement, but what
programmer in his right mind would dare to use it? <http://xkcd.com/292/>

~~~
batista
I can tell you what programmer would NOT dare use it:

a programmer that doesn't bother understand programming and when each feature
can be used, and instead relies on conventional wisdom and old wives tales
(sometimes called "voodoo programming") to tell him what is acceptable and
what is not.

Notice how the guys repeating the "goto is evil" mantra, like they guy in this
thread:

<http://kerneltrap.org/node/553/2131>

are young as it's highly improbable that they ever had to deal with actual
goto spaghetti code. So they just repeat what they heard somewhere.

This guy, e.g writes:

 _However, I have always been taught, and have always believed that "goto"s
are inherently evil. They are the creators of spaghetti code (you start
reading through the code to understand it (months or years after its written),
and suddenly you jump to somewhere totally unrelated, and then jump somewhere
else backwards, and it all gets ugly quickly). This makes later debugging of
code total hell._

Which, as I read it is clear that he has never actually witnessed in real life
the kind of code he worries about ("I have always been told", "I have always
believed" etc != "I know from experience").

I consider this more embarrassing than using goto.

~~~
NameNickHN
There are things in life that one doesn't has to try in order to know that
they are bad.

~~~
batista
Yes.

But there is nothing like those in programming, math, painting, etc.

And even if it where, goto wouldn't be one of them.

