Path: utzoo!mnetor!uunet!mcvax!diku!dkuug!ambush!kimcm From: kimcm@ambush.UUCP (Kim Chr. Madsen) Newsgroups: comp.lang.c Subject: Re^2: gotos (actually: **Apology**) Message-ID: <733@ambush.UUCP> Date: 20 Apr 88 08:56:34 GMT References: <2586@geac.UUCP> <225800022@uxe.cso.uiuc.edu> Organization: AmbraSoft A/S (Denmark) Lines: 34 In article <225800022@uxe.cso.uiuc.edu> mcdonald@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@ambush.dk, PHONE: +45 2424 111, FAX: +45 2423 090 Though I am not naturally honest, I am so sometimes by chance. -- William Shakespeare