The final word on GOTO (Don't I wis

Peter da Silva peter at ficc.uu.net
Sat Oct 14 02:47:27 AEST 1989


I said, in an example, "common(a, whole, bunch, of, random, arguments);"...

In article <566 at sunquest.UUCP> ggg at sunquest.UUCP (Guy Greenwald) writes:
> If the arguments are really random, how can the function work?

[ A whole lot of pedantic stuff ]

> Regarding local variables, you know 
> very well that C can have external variables.

I can be pedantic too.

Local variables, properly used, add considerably to the clarity and
maintainability of a program. Data hiding is acknowledged as a good
thing, because it increases the locality of the information required
to understand a block of code, and ensures that unsuspected back doors
are not created by careless programmers. In fact, one of the main
reasons for following the discipline of structured programming is to
improve this locality, and hide control structures from each other.

If on the one hand you improve the structure of control flow, by eliminating
gotos, and on the other degrade the structure of your data, by adding a
bunch of global (or even file-local) variables, what have you really
gained?

>  I think that no one is going
> to win this argument against you because you're going to come up with
> contrived rebuttals no matter what anyone says.

Well would you care to address the merits of my argument rather than either
coming up with contrived examples of your own or by blindly restating
religious doctrine?

To rebut your rebuttal of my contrived example, what about re-entrant
routines?
-- 
Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation.
Biz: peter at ficc.uu.net, +1 713 274 5180. Fun: peter at sugar.hackercorp.com. `-_-'
                                                                           'U`
Quote: Structured Programming is a discipline -- not a straitjacket.



More information about the Comp.lang.c mailing list