Newsgroups: comp.lang.c
Path: utzoo!utgpu!news-server.csri.toronto.edu!torsqnt!tmsoft!eci386!jmm
From: jmm@eci386.uucp (John Macdonald)
Subject: Re: Unnecessary parentheses (Was: Help: VAX C problem)
Message-ID: <1991Apr8.142709.5099@eci386.uucp>
Reply-To: jmm@eci386.UUCP (John Macdonald)
Organization: Elegant Communications Inc.
References: <1991Mar30.161854.27378@cbnewsk.att.com> <4072.27f7215c@iccgcc.decnet.ab.com> <1991Apr1.203600.15721@zoo.toronto.edu> <1#.gqcm@rpi.edu> <1991Apr2.185204.20516@zoo.toronto.edu>
Date: Mon, 8 Apr 1991 14:27:09 GMT

In article <1991Apr2.185204.20516@zoo.toronto.edu> henry@zoo.toronto.edu (Henry Spencer) writes:
|Parentheses inserted to make grouping clearer are "unnecessary" only to
|the compiler; almost nobody really has the C precedence rules memorized.

Even more important, almost nobody has the C precedence rules
internalized - memorized to the extent that reading an
unparenthesised complex expression is easier than reading the
same expression with careful (not necessarily total)
parenthesisation.

Many people will be able to internalize the precedence for
addition and multiplication and (almost any single other
operator) in a single expression and read such an expression
at least as easily without parentheses.  Such units make good
candidates for the bottom level of parenthesisation within
more complicated expressions.  Extra parentheses beyond these
may be appropriate also when an otherwise straightforward
expression is long - either because of lengthy variable names
or because the unary values are function calls with long
arguments lists or other large expressions.
-- 
sendmail - as easy to operate and as painless as using        | John Macdonald
manually powered dental tools on yourself - John R. MacMillan |   jmm@eci386
