DIP49 - Define qualified postblit
Daniel Davidson
nospam at spam.com
Sun Nov 10 07:41:20 PST 2013
On Sunday, 10 November 2013 at 13:46:20 UTC, Kenji Hara wrote:
> 2013/11/10 Daniel Davidson <nospam at spam.com>
>
>> With this design, is there no need then for struct
>> constructors - or would
>> this be orthogonal or in addition to those?
>>
>
>
> Currently "constructing unique object" is already supported.
>
> http://dlang.org/class#constructors
>> If the constructor can create unique object (e.g. if it is
>> pure), the
> object can be implicitly convertible to any qualifiers.
>
> Indeed, the definition could be improved by using "initializing
> unique
> expression" concept. But it is not directly related to the
> DIP49. So the
> answer is "this is orthogonal".
From this thread
(http://forum.dlang.org/post/mailman.89.1383248384.9546.digitalmars-d-learn@puremagic.com)
I was under the impression that const/immutable and postblits
don't mix. This DIP seems to be trying to address that. One of
the potential workarounds to this issue was the idea of struct
copy constructors. This is what I was referring to. With this
proposal, is there still a need for struct copy constructors?
Thanks
Dan
More information about the Digitalmars-d
mailing list