Cristian Livadaru's blog

... think again ...

The Bad and Ugly GOTO

In school you learn to never ever use GOTO in your programs, since in real life things turn out to be much different then in school it’s not quite practicable. I was looking for GOTO in Bash and came across this statement

Originally Posted by gnashley
Not a good idea to use GOTO in BASH. Try using a while statement instead, or use functions.

And this was the reply

Go HUG a tree or shag a dolphin or something.

Computers WORK in “GOTO”s. Whiles, procedures and case structures are mental masturbation.

They’re all compiled to a bunch of goto’s anyway.

Technorati Tags: programming, bash