Why I'm Excited about D
via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 7 11:39:45 PDT 2015
On Tuesday, 7 April 2015 at 18:21:44 UTC, H. S. Teoh wrote:
> Actually, I find the current use of = vs. == in programming
> languages
> rather counterintuitive, even though I myself have become
> accustomed to
> it as you have. If I were ever to invent my own programming
> language,
> I'd use = for equality and := for assignment. (I wouldn't
> include ==,
> though; I think it's an eyesore.)
Simula uses =, <=, >=, <> for value comparison. For references
comparison: ==, =/=. Value assignment is done with := and :- is
used for reference assignment.
I am not sure if I like the visual confusion of references and
values in languages like C# and D, but I am also not happy about
having to type *this in C++... With reference operators you
bypass all the dereferencing clutter.
More information about the Digitalmars-d
mailing list