Article View: comp.lang.misc
Article #4422Re: GOTO controversy
From: Verne Arase
Date: Wed, 03 Apr 1996 13:37
Date: Wed, 03 Apr 1996 13:37
43 lines
1834 bytes
1834 bytes
In article <4jq2en$g2q@news.cais.com>,
dlabell@paltech.com (David Labell) wrote:
>>: Looping with out a loop
>>
>>: no_loop(0,10);
>>
>>: no_loop(int start, int end)
>>: {
>>: if(start != end) {
>>: stuff
>>: no_loop(start+1,end);
>>: }
>>: }
>>
>>: I haven't tested this but you get the idea.
>
>Here's a guy who would rather recurse than loop. I don't mean to be rude,
>but this is typical of C programmers. Why not write it so it says what it
>does?
>
>Who benefits from your tricks?
People who write developer tools for debugging blown stacks and corrupted
heaps :-).
Data dependent errors are the production programmer's worst nightmare;
especially as they normally occur at 3:00 AM with some panicked operator
who can't read english on the other end of the line.
I avoid recursion in _any_ production code, no matter how I can minimize
the stack frame.
Recursion can make for visually appealing and simplified code, but in real
terms they're nothing but trouble unless you can absolutely positively
guarantee a finite, known level stack depth.
Nothing can compare to debugging some clever code in the middle of the
night due to the fact that you've got in-order data strung out on a binary
tree, traversed by recusion :-/.
---
The above are my own opinions, and not those of my employer.
Technical Details
Message-ID:
<AD87DB279668D9F74@mcdiala15.it.luc.edu>Path:
arc1-ca.pugleaf.net!news.luc.edu!userReferences:
<314FB5F5.259B@simi.is> <3151B47F.70FD@connix.com> <4jo5t6$1ki@socrates.moe.edu.sg> <4jq2en$g2q@news.cais.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.luc.edu!user From: VArase@varase.it.luc.edu (Verne Arase) Newsgroups: comp.lang.misc,comp.lang.c,comp.lang.pl1,comp.lang.apl Subject: Re: GOTO controversy Date: Wed, 03 Apr 1996 07:37:11 -0600 Organization: LUMC Message-ID: <AD87DB279668D9F74@mcdiala15.it.luc.edu> References: <314FB5F5.259B@simi.is> <3151B47F.70FD@connix.com> <4jo5t6$1ki@socrates.moe.edu.sg> <4jq2en$g2q@news.cais.com> NNTP-Posting-Host: 147.126.240.115