Re^2: gotos (actually: **Apology**)

Kim Chr. Madsen kimcm at ambush.UUCP
Wed Apr 20 18:56:34 AEST 1988


In article <225800022 at uxe.cso.uiuc.edu> mcdonald at uxe.cso.uiuc.edu writes:

>I am FED UP with goto bashers! I'll admit that code filled with gotos
>may be messy: if I write a goto, it's because I feel like it! I don't
>give a DAMN whether you like goto's or not; I believe in using whatever 
>tool is at hand to get the job done. I frankly don't believe for
>ONE CLOCK TICK OF A CRAY 2 that gotos make code worse. Spaghetti is
>spaghetti, whether it is done with gotos or some other construct, and
>so is any other equivalent mess.

I'll agree wholeheartedly, the problem is though that in order to
propagate good coding style one has to be taught how to avoid gotos
when inappropriate -- especially if one comes from a BASIC
environment. This is best enforced by outlawing the use of goto's in
teaching structured programming - then after the student has learned
how to program structured you can teach them the uses of goto's (but I
bet the know it already). Unfortunately many computer students are
unable to leave the paradigm "GOTO'S CONSIDERED HARMFUL" behind them
once they got a grip on programming -- thus going to great lengths
(and pains) to write programs abandoning a "natural" goto.


Even Mr. Dijkstra had once compared the goto's with alcohol, it's nice
when used properly, you get headaches when you use it too much and you
don't give it to minors.


Regards 
Kim Chr. Madsen, AmbraSoft A/S, Rojelskaer 15, DK-2840 Holte (Denmark)
UUCP: kimcm at ambush.dk, PHONE: +45 2424 111, FAX: +45 2423 090

Though I am not naturally honest, I am so sometimes by chance.
					-- William Shakespeare
					



More information about the Comp.lang.c mailing list