[OT] [sdiy] IN your mind, what is ....
Magnus Danielson
cfmd at bredband.net
Wed Feb 4 20:30:50 CET 2004
From: Don Tillman <don at till.com>
Subject: Re: [OT] [sdiy] IN your mind, what is ....
Date: 04 Feb 2004 01:18:35 -0800
Message-ID: <m2y8rj2oes.fsf at till.com>
> This discussion is getting very silly. For those folks who
> appreciate my rants, I present the following:
>
> > Date: Tue, 03 Feb 2004 22:13:16 -0500
> > From: "Michael E. Caloroso" <analoguediehard at att.net>
> >
> > Darren/Shokwave wrote:
> > >
> > > They always look at each other, and gingerly one will raise a
> > > hand and say "but other instructors told us to never use a
> > > goto", and I grin peacefully like Buddha and say "Yes, *you*
> > > shouldn't...unless you know you should. Try and write that code
> > > without one, and show me a CLEARER way to do it.
> >
> > There is ALWAYS a way around goto statements. Not a simpler solution,
> > but it keeps the pointer stack clean which is a goto cannot do.
>
> Darren said "show me a CLEARER way to do it".
>
> Sure there's always a way around a GOTO. Java has no GOTO, Pascal
> actively discourages GOTOs, Scheme takes a GOTO and replaces it with a
> damned tail-recursion-optimized-function-call-that-never-returns...
> (What drugs were they taking when the came up with that one?)
>
> If the operation you're doing is a naturally GOTO-like operation, what
> is so freaking horrible about implementing it with a GOTO instruction?
>
> Eliminating the GOTO is Political Correctness applied to software.
Exactly! Anyone disagreeing can read Prof. Knuth's excellent discussion about
it.
The point about the defamation of goto was to reduce the THEN current over-
usage of it, which WAS (and still can be) a main obstacle to a structured
programming style. Once you have a structured programming style, there is still
valid points in the code for goto and where it remains the wisest thing to use.
Goto is like any other tool something which should be used carefully, just as
with pointers, recursion, fixed vector-sizes, object-orientation, threading,
type-casting, addition or whatever else you might come up with. There is
nothing wrong with a goto here and there, even outside of error-functions, but
the usuage shall make the code clear and readable and not cause stack-trashing.
It's better to learn how to use that little tool wisely than trying to convince
people that it is evil, that's a 70thies war.
Cheers,
Magnus - who obviously must start use goto statements just for the sake of it
More information about the Synth-diy
mailing list