Re: [stella] OT: Programming, CS theory

Subject: Re: [stella] OT: Programming, CS theory
From: Ben Larson <wazzapfool@xxxxxxxxx>
Date: Thu, 25 Oct 2001 17:17:58 -0700 (PDT)
> > THEORY: Never use GOTO statements!
> > PRACTICE: Avoiding GOTOs sometimes results in
> nested IF statements that are
> > 200 lines long, which are a pain to debug
> 
> 
> That really depends on the language you're using.
> Gotos make sense when 
> the language you're using lacks a specific means of
> representing the 
> code structures you need.

Ah the eternal struggle between GOTO-ers and
non-GOTO-ers. :)  Personally, I fall into the latter
faction. :)

Reason being, I'm pretty sure it's been proven
mathematically (by the computer scientist Edsger
Dijkstra maybe...?) that any piece of code using a
GOTO statement can always be replaced by a non-GOTO
alternative, as long as you have some looping
construct available.  Every imperative language I know
of (excluding assembly language, of course) has at
least one looping construct, so why ever use GOTO?  It
just makes the code harder to read...and maintain,
IMHO...


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

-
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread