Make const, immutable, inout, and shared illegal as function attributes on the left-hand side of a function
Brad Anderson via Digitalmars-d
digitalmars-d at puremagic.com
Fri Oct 10 16:04:39 PDT 2014
On Friday, 10 October 2014 at 21:10:14 UTC, Walter Bright wrote:
> Const works differently in D than in C++, and this doesn't
> change that. First off,
I think it's rather unfortunate that D used keywords from C++ for
things that work differently. const in particular but struct and
class cause confusion and bickering too. Think of all the hours
spent on this newsgroup arguing about logical const. If D's const
were called something else like readonly nobody would be trying
to shoehorn logical const into it and calls for logical const
would have been discussed without having to pit two features
against each other for a single spot in the language.
Another is char for utf-8 code units. So many people assume a
char is a character when it's actually only sometimes a character
by coincidence. If it had a different name like utf8_unit people
would probably write more unicode correct code naturally.
More information about the Digitalmars-d
mailing list