DIP49 - Define qualified postblit
Kenji Hara
k.hara.pg at gmail.com
Sun Nov 10 05:46:08 PST 2013
2013/11/10 Daniel Davidson <nospam at spam.com>
> On Sunday, 10 November 2013 at 06:46:47 UTC, Kenji Hara wrote:
>
>> http://wiki.dlang.org/DIP49
>>
>> Experimental compiler/druntime patches (WIP, 80% completed):
>> https://github.com/9rnsr/dmd/tree/qual_pblit
>> https://github.com/9rnsr/druntime/tree/qual_pblit
>>
>> Kenji Hara
>>
>
> Does the analysis hold up the same if the type held in the array itself
> has mutable aliasing?
>
> struct T { int[] i; }
> struct S { T[] t; }
>
> Also, does it hold up with associative arrays?
>
> struct S { string[string] aa; }
>
Yes.
> 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".
Kenji Hara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20131110/6148a6be/attachment.html>
More information about the Digitalmars-d
mailing list