Article View: comp.lang.misc
Article #4425Re: GOTO controversy
From: Kelly Hall
Date: Wed, 03 Apr 1996 20:59
Date: Wed, 03 Apr 1996 20:59
19 lines
1585 bytes
1585 bytes
In article <AD87DB279668D9F74@mcdiala15.it.luc.edu>
VArase@varase.it.luc.edu "Verne Arase" writes:
>> 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.
>>>>> "Lawrence" == Lawrence Kirby <fred@genesis.demon.co.uk> writes:
Lawrence> An O(log N) stack depth is generally not a problem. I
Lawrence> guess you could say that is finite because there are
Lawrence> typically practical upper bounds to N.
Tail recursion is implemented by all non-stupid compilers the same way
as the imperative (goto) version. Gcc will do this, whether or not
your favorite compiler will is a different matter.
No stack problems at all.
Kelly
Technical Details
Message-ID:
<oun34tm3c7.fsf@lynx.cs.byu.edu>Path:
arc1-ca.pugleaf.net!hamblin.math.byu.edu!usenetReferences:
<314FB5F5.259B@simi.is> <3151B47F.70FD@connix.com> <4jo5t6$1ki@socrates.moe.edu.sg> <4jq2en$g2q@news.cais.com> <AD87DB279668D9F74@mcdiala15.it.luc.edu> <828549619snz@genesis.demon.co.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!hamblin.math.byu.edu!usenet From: hall@cs.byu.edu (Kelly Hall) Newsgroups: comp.lang.misc,comp.lang.c,comp.lang.pl1,comp.lang.apl Subject: Re: GOTO controversy Followup-To: comp.lang.misc Date: 03 Apr 1996 13:59:04 -0700 Organization: Computer Science Dept. BYU Sender: hall@lynx.cs.byu.edu Message-ID: <oun34tm3c7.fsf@lynx.cs.byu.edu> References: <314FB5F5.259B@simi.is> <3151B47F.70FD@connix.com> <4jo5t6$1ki@socrates.moe.edu.sg> <4jq2en$g2q@news.cais.com> <AD87DB279668D9F74@mcdiala15.it.luc.edu> <828549619snz@genesis.demon.co.uk> NNTP-Posting-Host: lynx.cs.byu.edu Mime-Version: 1.0 (generated by tm-edit 7.46) Content-Type: text/plain; charset=US-ASCII In-reply-to: Lawrence Kirby's message of Wed, 03 Apr 96 16:40:19 GMT