On Sunday, 10 November 2013 at 13:46:20 UTC, Kenji Hara wrote:
2013/11/10 Daniel Davidson <nos...@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-le...@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

Reply via email to