Re: Goto [Was Re: Chown ???]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Ihnat wrote:
> On Fri, Apr 10, 2009 at 11:07:00AM -0400, James Kosin wrote:
>> Actually, GOTO was very heavily in BASIC programming language.  There
>> was no idea of statement blocks back then.
>> It may be the only language at the time where it isn't considered taboo.
> 
> That's been a bone of contention for, literally now, decades.  "Goto"
> isn't _taboo_, as such.  It's misuse/overuse is taboo.
> 
> The purpose of deprecating use of goto was to avoid the spaghetti code
> that was so prevalent, especially in C.  HOWEVER, blind adherence to
> avoidance of the use of a strategically placed goto can result in
> equally obscure code.  This is typically seen in deeply nested if
> statements; I've seen nests 10 and 15-levels deep that would have been
> far more clear if a simple error-condition goto to the end of the nest
> had been implemented.
> 
> I remember a Master Chief Petty Officer in the Navy when I was a lowly
> Middie 3C.  He'd just done something that was Stricly Forbidden, and I
> asked him--very tentatively; you treat Master Chiefs with respect just
> below that of Captain, if that--if what he'd done was by the regs.
> 
> "Nope.  There are Rules, and they're good 'uns.  Follow them."
> 
> But...you just...
> 
> "Rules are good.  You gotta know when to follow 'em, and when not to.
> You don't know enough yet to know when not to follow 'em, so follow
> 'em."
> 
> It's been good advice for these past 30 years.
> 
> Cheers,
> --
> 	Dave Ihnat
> 	dihnat@xxxxxxxxxx
> 
I'm not implying GOTOs are acceptable.  I'm only pointing out back then
they were common place for a different reason.
BASIC didn't have a method to put more than 1 statement in an [ if then
else ] without using either GOSUB or GOTO in some way.

James

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux