A question of style

Andrew P. Mullhaupt amull at Morgan.COM
Wed Nov 29 14:40:02 AEST 1989


In article <680013 at hpmwjaa.HP.COM>, jeffa at hpmwtd.HP.COM (Jeff Aguilera) writes:
> > I think the correct word is "wary".  My reaction would be "uh-oh -- this
> > programmer is putting his own convenience and the joys of clever coding
> > above readability and maintainability -- better treat this code as an
> > amateur production and not rely on it too much".
>
... 
> 
> I'm sure you object to
> 
>     1) nonintuitive operator overloading
>     2) proper use of comma expression
>     3) long lines
>     4) terse comments, not aligned with tabstops
>     5) use of = in if () statement
>     6) avoidance of newlines
>     7) avoidance of braces
>     8) individualistic programming styles
>     9) code that works so well it requires no maintenance
>        (because I have a mathematical modeling proving that
>        it works)

Ah! trick questions? Clearly 1,3,5,6,7 and 8 are objectionable, and
likely 4 as well. Now 2 is interesting, because I can't think of what
I would call a 'proper' use of the comma operator, and then for 9,
where are your proof rules for C? I'm actually interested in the
possibility of proofs of correctness in C, but so far I have not found
rules for more than a restricted subset. Perhaps you can enlighten me?

L
i
n
e
s

a
p
p
e
n
d
e
d


Later,
Andrew Mullhaupt



More information about the Comp.lang.c mailing list