From: CONDIC@PSAVAX.PWFL.COM
Subject: Re: State machines and Goto's (was Re: Should internet support so
Date: 1995/04/07
Date: 1995-04-07T00:00:00+00:00 [thread overview]
Message-ID: <INFO-ADA%95040709313485@VM1.NODAK.EDU> (raw)
From: Marin David Condic, 407.796.8997, M/S 731-93
Subject: Re: State machines and Goto's (was Re: Should internet support softwar
Original_To: PROFS%"SMTP@PWAGPDB"
Original_cc: CONDIC
Theodore Dennison <dennison@ESCMAIL.ORL.MMC.COM> Writes:
>
>I have now worked under 3 different Ada coding standards. Every one
>of them had a "no goto's" rule. Since I'm currently editing our next
>coding standard, perhaps someone could suggest a replacement rule? It
>should be very specific about what allowable and unallowable goto's
>are. We need something that our software quality folks can enforce.
>The rule can make NO assumptions about the competency of the programmer,
>as we won't find out the truth on that matter until it is too late.
>
I'll throw in my $0.02. I've been programming in Ada for what is
beginning to seem like a very long time now and done a variety of
systems in a number of problem spaces. (realtime, business,
database, mathematical, navigational, etc.) I have NEVER ONCE
needed a goto to implement the design of any of these systems or
seen an example of where the use of a goto as opposed to
structured techniques would result in a "cleaner design".
There may be systems or problem spaces where the goto _would_
result in cleaner design. There may be gold bricks in the Great
Wall of China. There may even be sheep that fly (with all the
enormouse commercial possibilities that implies). I just have
never seen any of these phenomena. If you think you need to use a
goto instead of a case/if/while/etc. then you probably haven't
thought about it long enough.
I'd suggest that your coding standard ought to disallow goto's.
Granted - they can be used properly and not produce spaghetti code,
but they are too easily abused. (When DEC invented BLISS, they
didn't even include a goto in the language)
I'd also suggest that you put a clause up at the very beginning of
your coding standard (in VERY BOLD TYPE!!!) that _any_ of the
rules laid down in the standard may be violated provided that the
software engineer responsible documents it and provides a
justification. We've done that for years and had very few
instances where the coding standard was circumvented. When it's
been done, there's usually a good engineering reason for doing so
and you can find it out by reading the comments.
Pax Vobiscum,
Marin
Marin David Condic, Senior Computer Engineer ATT: 407.796.8997
M/S 731-93 Technet: 796.8997
Pratt & Whitney, GESP Internet: CONDICMA@PWFL.COM
P.O. Box 109600 Internet: MDCONDIC@AOL.COM
West Palm Beach, FL 33410-9600
===============================================================================
Please send responses to one of the addresses in this trailer.
A "reply" to the address in the message header will bounce.
===============================================================================
"Get this straight once and for all. The policeman isn't there to
create disorder; he's there to preserve disorder."
-- Richard J. Daley, former mayor of Chicago.
===============================================================================
next reply other threads:[~1995-04-07 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-04-07 0:00 CONDIC [this message]
1995-04-07 0:00 ` State machines and Goto's (was Re: Should internet support so David Weller
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox