What the hell is wrong with D?
Brad Anderson
eco at gnuk.net
Tue Sep 26 19:35:24 UTC 2017
On Saturday, 23 September 2017 at 20:43:36 UTC, Patrick Schluter
wrote:
> So I checked for all the languages listed: C, C#, Java,
> Javascript, C++, PHP, Perl and D. All have the same order of
> precedence except, as always the abomination of all languages:
> C++ (kill it with fire).
> C++ is the only language that has the ternary operator have the
> same precedence than the assignment operators.
> This means a>=5?b=100:b=200; will compile in C++ but not in all
> the other languages. That's one reason why it irritates me when
> people continuously refer to C and C++ as if it was the same
> thing (yes I mean you Walter and Andrei).
> Even PHP and Perl got it right, isn't that testament of poor
> taste Bjarne?. :-)
It's not quite as big of a deal as it seems because of the RTL
associativity for both of them but still a very weird thing at
face value.
More information about the Digitalmars-d-learn
mailing list