Why is there no or or and ?

Nick Sabalausky a at a.a
Fri Feb 17 07:08:00 PST 2012

"F i L" <witte2008 at gmail.com> wrote in message 
news:ycdqoufsbftcccpekdpx at forum.dlang.org...
> On Friday, 17 February 2012 at 06:25:49 UTC, H. S. Teoh wrote:
>> On Fri, Feb 17, 2012 at 06:47:20AM +0100, F i L wrote:
>>> I would use them over '||' and '&&' for the reasons bearophile gave.
>>> Highlighted as keywords, they're easily set appart, easier to type,
>>> and more distinguished... then again if I had my way I'd remove the
>>> '('/')' brackets, ending marks, and auto keyword; switched the
>>> definition name-type placement and change if/else/return/contract
>>> syntax...
>> Well, if you're going to reinvent the language syntax, I'd like to
>> replace:
>> = with :=
>> == with =
> I would agree with this, only there should be a distinction between 
> assignment and declaration. Which in my syntax is ':'. Maybe the keyword 
> 'is' could apply to runtime conditions.. might go nicely with the 'not' 
> statement.

I've always agreed with the usual reasoning behind ":= and = instead of = 
and ==", but in practice I don't like it becase assignment is so 
*incredibly* common I don't want it to be a 2-handed 3-keypress 
"Shift+Keypress and then another keypress". Just one keypress, thank you. 
And yes, equality is fairly common, too, but *UNLIKE MATH*, equality isn't 
quite *as* common as assignment. Plus, "==" is even a little easier than 
"two keypresses" since it's the same key, not two different keys.

More information about the Digitalmars-d mailing list