goto

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Tue Jul 19 09:16:55 CEST 2005


rbt enlightened us with:
> Many of the world's most profitable software companies (MS for
> example) have thousands of goto statements in their code... oh the
> horror of it all. Why aren't these enlightened-by-the-gods
> know-it-alls as profitable as these obviously ignorant companies?

They write software with huge security holes. Direct3D still isn't as
stable as OpenGL. It takes ages for them to create security patches.

The things I mention are *not* caused by their nice and clean way of
coding.

As a matter of fact, they use goto to jump from one function to
another! And to make sure a 'return' doesn't return to the last call,
but to some other, they combine this awful use of goto with manual
stack manipulation. And they do all of this in C (or some derivative)
so if one function changes it's parameters, all the manual stack
modifications and gotos need to be checked for correctness.

I'd rather use an exception, or better even - write small functions so
I can call 'return' instead of doing 'goto EXIT'.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list