Type Qualifiers and Wild Cards

deadalnix deadalnix at gmail.com
Tue Nov 8 05:08:19 PST 2011


Le 08/11/2011 02:08, Walter Bright a écrit :
> http://drdobbs.com/blogs/cpp/231902461
>
> Anyone want to do the reddit honors?

Great article. The only point I would raise is the choice of inout as a 
keyword for this.

This make no sens whatsoever. Here is why :
- inout did exist in D1 and is different.
- in and out qualifier already exists and have nothing to do with inout.
- in and out are used for contracts and have nothing to do with inout.
- the inout term has nothing to do with const/immutable/mutable. This is 
in a totally different lexical field.

Another keyword should be choosen. vconst, as suggested here : 
http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP2 is way more 
appropriate.

On external details, but still important, I face the need of inout few 
days ago and did knew about it. The documentation on const/immutable ( 
http://www.d-programming-language.org/const3.html ) doesn't mention it. 
The page on fucntion mention it, but it would be nice to have at least a 
link on the const/immutable page.


More information about the Digitalmars-d mailing list