Why is there no or or and ?

Caligo iteronvexor at gmail.com
Thu Feb 16 21:48:11 PST 2012

On Thu, Feb 16, 2012 at 11:16 PM, Nick Sabalausky <a at a.a> wrote:
> This is why I think people are nuts when they claim that english-like
> VB-style syntax is more readable than C-style.
> (Yea, to a grandmother with zero programming experience english-like
> languages are more readable. For a programmer it's worse becase code !=
> english.)

This is not about having an English-like syntax.  Not every programmer
speaks English, but nearly every programming language uses English
words.  At least for them 'and'  and && are about the same.

I can agree that having multiple operators that do the exact same
thing can be problematic, so such a change might be too late for D
(unless we replace &&, ||, etc. with 'and', 'or', etc.).  But at the
same time, when I was new to D I found things like 'is' and '=='
confusing, and I'm sure I'm not the only one.

Another thing, most editors render keywords with a different colour
than, say, the logical operators. So in

if(a or b and c){ }

the 'if', 'and', and 'or' are the same colour.

More information about the Digitalmars-d mailing list