why bother with operator precedence
John Kessenich
jk at hpfelg.HP.COM
Thu Mar 29 03:52:35 AEST 1990
>Insisting that students use minimal parenthesization will help them
>to learn the precedence rules, but why bother?
Completely paranthesizing a complex expression makes it unreadable,
but partial paranthesization mixed with vague knowledge of precedence
leads to errors (if you're not going to put all paranthesis on, and
you're not sure of the rules, the ones you leave out are potentially
incorrect guesses).
Best choice: have detailed knowledge of precedence but paranthesize
for correctness and readability instead of minimality.
--------------
John Kessenich
More information about the Comp.lang.c
mailing list