Structured Programming

btcx at vax5.CIT.CORNELL.EDU btcx at vax5.CIT.CORNELL.EDU
Sat Feb 25 15:25:46 AEST 1989


In article <234 at jarthur.Claremont.EDU> wilkins at jarthur.UUCP (Mark Wilkins) writes:
>In article <89071 at sun.uucp> lm at sun.UUCP (Larry McVoy) writes:
...
>>I've worked in those so called ``structured programming languages'' ...

"so-called" - Amen!
...
>
>      IN SHORT:  If you don't need structured programming because your
>program is really small, then great.  But very little is that easy to
>program in an unstructured way.  Ever try writing 10,000 line program that 
>works in Applesoft BASIC?  THAT will make you a believer.

No prob IF you "structure" it.  Difficult, but possible.

My Soap box follows - press n or be bored!

Theorem:  There's no such thing as a structured programming language,
             only structured programmers.

Does anybody remember that the original bias against goto's came from a paper
that associated PROGRAMMERs' use of the goto inversely with their ability
i.e. it's the programmers' use, NOT the language's posession, of the goto that
is the problem. 

You can write a crummy program in ANY language.

Fancy constructs like dowhile, repeat, break, etc are nice, but they are 
ONLY cosmetic, as indeed all HLL's are.  Witness the past discussion in .lang.c
where they were arguing about loops in ("portable" -ha!) c and saying you
should count some loops up and some loops down for performance because of
differences in compilers and instruction sets on different cpu types.  And how
many times have we been burned because we forgot whether a loop construct will
always execute once or not; and how many compiler bugs were based on
misunderstandings like that? Mistakes of that sort are few when you do
the loop counting in the HLL and use goto's. 

That said, I am no great fan of goto, or antagonist of all those handy 
constructs, I just like to say that

The fault, dear Brutus, lies not in our programming languages, but in ourselves!

brian carcich



More information about the Comp.unix.wizards mailing list