DIP53 and DIP49 (ver2) - New definitions for qualified constructors and postblits

ilya-stromberg ilya-stromberg-2009 at yandex.ru
Wed Dec 18 04:32:20 PST 2013


On Wednesday, 18 December 2013 at 11:10:10 UTC, QAston wrote:
> On Wednesday, 18 December 2013 at 03:42:46 UTC, Kenji Hara 
> wrote:
>> http://wiki.dlang.org/DIP53
>> Redesign currently implemented qualified constructor concept.
>>
>> http://wiki.dlang.org/DIP49
>> Improved points from version 1:
>> - Swap meanings of 'this(this) inout' and 'this(this) const'
>> - Inout postblit now covers all cheap (== not rebind 
>> indirections) copies between same qualifiers
>>
>> Kenji Hara
>
> This is awesome, maybe I'll be able to use immutable in my 
> code, thanks to this and your bugfixes (opAssign)!
>
> One suggestion though - maybe @unique would be better than 
> const for unique postblit/constructor, I think static confusion 
> is an important lesson from the past.

I agree, `@unique` attribute looks more clear.
BTW, we can use `unique` keyword for unique postblit/constructor. 
Also, we can use this keyword for unique storage class of 
variables and related issues.


More information about the Digitalmars-d mailing list