On Wed, 10 Jan 2001, Asger K. Alstrup Nielsen wrote:

> On 9 Jan 2001, Lars Gullik Bjønnes wrote:
> >       - () mithout meaning hides () that are really needed.
>
> Parenthesis are needed if the author feels they are needed. And then, they
> are really needed. It's as simply as that.
>
> Come on, Lars. Code is for communication between humans, not machines.
> That's why we don't use binary codes.
>
> You should write the code such that humans can understand it,
> and that involves proactively using parenthesis when there is
> some doubt to the meaning, or you generally feel that it can improve the
> understanding.

A comment or two before the groups of conditions can also help make sense
of what's going on and may help avoid the situation we had with the '\n'
after tables where someone cut a conditional in half with a preprocessor
directive because they didn't understand what was going on.  There was a
comment in that case but it seems it was either ignored or the person
decided they understood what was going on better than the person who wrote
the comment.  (There's still a problem with '\n' after tables in floats
but that may be easier to fix (or even disappear) once NEW_INSETS is
the default)

Anyway,  grouping conditions together with a () is all well and good but a
comment explaining why they are grouped is even more useful.

Allan. (ARRae)

Reply via email to