Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jan 1999 20:01:23 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Sheldon Hearn <axl@iafrica.com>
Cc:        Mikhail Teterin <mi@kot.ne.mediaone.net>, current@FreeBSD.ORG
Subject:   Re: btokup().. patch to STYLE(9) (fwd)
Message-ID:  <19990129200123.I8473@freebie.lemis.com>
In-Reply-To: <88592.917598420@axl.noc.iafrica.com>; from Sheldon Hearn on Fri, Jan 29, 1999 at 10:27:00AM %2B0200
References:  <199901290555.AAA28927@kot.ne.mediaone.net> <88592.917598420@axl.noc.iafrica.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday, 29 January 1999 at 10:27:00 +0200, Sheldon Hearn wrote:
> On Fri, 29 Jan 1999 00:55:21 EST, Mikhail Teterin wrote:
>> Everybody's goal is to keep/make code readable (accusations of "trying
>> to obfuscate" are silly). You, people, are just not agreeing what
>> "readable" means. Hoping to aid in the ending of this thread(s),
>
> Thank you very much. This is _exactly_ the point here.
>
> As far as I see it, there are a lot of people who are saying
>
> "I want to use parens to improve readability"
>
> when what they really mean is
>
> "I want to use parens to obviate the need to learn operator precedence."

I suppose that depends on whether you consider the code write-only or
read-write.

> I can't imagine how unnecessary parens are going to improve
> "readability" for anyone who knows his/her operator precedence.

What about the others?

> What it does is allow folks who aren't sure about what they're doing
> to get around doing things properly.

Remember, we're not talking about the writer now, we're talking about
the reader, who in the general case is not the same person.

To quote ``Design and implementation'':

  Documentation is the castor oil of programming.  Managers know it
  must be good because the programmers hate it so much.

Adding the occasional superfluous brace or paren pair can help a lot
there.  And if superfluous parens are so bad, explain why the kernel
is full of things like:

   return (error);

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990129200123.I8473>