Type Qualifiers and Wild Cards
Gor Gyolchanyan
gor.f.gyolchanyan at gmail.com
Tue Nov 8 05:36:03 PST 2011
I agree with _inout_ being a bad choice.
I'd rather use something involving _auto_, because this kind of use of
_auto_ is already employed in _auto ref_ parameters and is visually
unambiguous.
Probably _auto const_ would do the trick.
The actual _inout_ keyword could be flagged as deprecated and removed
during the next breaking change in D (along with all other wonderful
breaking changes that were proposed).
On Tue, Nov 8, 2011 at 5:08 PM, deadalnix <deadalnix at gmail.com> wrote:
> 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