Hello,

Here is a small rant about keyword logical operators and usage at my
work.  I am not making any proposals so please ignore this mail if you
are busy :-)

On Thu, 16 Mar 2006 15:14:01 +0900, Yukihiro Matsumoto  
<matz / ruby-lang.org> wrote:

> OK.  Keyword logical operators (and, or, not) are far lower precedence
> than comma, even lower than method calls without argument parentheses
> (in parser, they are called as commands), so that they are not allowed
> be a part of argument expression.

At work the use of (&&, ||, !) vs (and, or, not) is an issue we run
into from time to time.  Personally, I dislike using (and, or, not)
mainly because of the above precedence issues, but also because in the
back of my head I would like these words to be method calls.
Unfortunately, some of my colleagues like them mostly for readability
purposes.

For now all we can do is agree to not change the code from one way to
the other unless there is a bug.  Thus if I write some code such as:

"if foo && bar"

Then a coworker cannot come and change that line to:

"if foo and bar"

This is a sort of stand still in our coding guidelines, but at least it
helps keep cvs annotate somewhat clean.

In my fantasy Ruby these keyword logical operators would not exist or
they would be the same precedence.

Cheers,
Zev