On 4/12/2012 10:48 AM, Andrew Haley wrote:

Certainly, everything that adds to clarity (and has no runtime costs!)
is desirable.  But adding parentheses may not add to clarity if doing
so also obfuscates the code.  There is a cost to the reader due to a
blizzard of syntactically redundant parentheses; if there weren't, we
wouldn't bother with operator precedence.

Well I think blizzard is overblown. Ada requires these parentheses
and I never heard of anyone complaining of blizzards :-)

Ultimately, it's a matter of taste and experience.  I'm going to find
it hard to write for people who don't know the relative precedence of
&  and | .

Well it's always a problem for programmers who know too much to write
code that can easily be read by everyone, in Ada we take the position
that readability is paramount, and we really don't care if programmers
find it harder to write readable code :-)

Andrew.

Reply via email to