DIP49 - Define qualified postblit

Marco Leise Marco.Leise at gmx.de
Sun Nov 10 19:39:15 PST 2013


Am Sun, 10 Nov 2013 21:03:34 +0900
schrieb Kenji Hara <k.hara.pg at gmail.com>:

> So, separating "inout postblit' and 'unique postblit' may be reasonable.
> 
> (However, it seems to me that the syntax "this(inout this) inout;" looks
> weird...
> 
> Kenji Hara

I see the value in DIP49. There is a hole in the type system
that needs a proper solution and it is astonishing that the
"unique" concept is already there in D, but existed under the
radar of public perception. I haven't read everything, but
agree with making the language more fail safe any time.

I just find inout confusing as well. inout as a wildcard for
const-ness is irritating enough, and with the double meaning
as unique it might be difficult to read code using inout.
Are the two concepts really coupled? Does it make the
implementation of the DIP easier? Or should we have something
like "unique" as a keyword?

-- 
Marco



More information about the Digitalmars-d mailing list