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

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

Les wrote:
On Fri, 2009-04-10 at 10:32 -0500, 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

It's been good advice for these past 30 years.

As an retire Navy Chief, I'll second that advice.  Thanks for the great
memories and a chuckle.

Les Howell ETC USN (Ret.)

To think I have been talking to Swabby.


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