DIP74 - where is at?

Freddy via Digitalmars-d digitalmars-d at puremagic.com
Sun Oct 11 07:27:34 PDT 2015


On Sunday, 11 October 2015 at 06:10:32 UTC, Jonathan M Davis 
wrote:
> alias is problematic, because it allows the class reference to 
> escape. opDispatch doesn't have that problem, though there may 
> be other complications that it introduces (I don't know). It 
> does get kind of complicated though when you consider member 
> functions which return the a reference to the object and things 
> like that. So, while it's generally feasible, it's not that 
> hard for it to become unsafe. How much that matters is 
> debatable, but it could make it so that reference counting 
> classes is infeasible in @safe code.
>
> - Jonathan M Davis

Can't we make opAssign and this(this) work with classes add 
@disable to them? Also rec counted classes shouldn't have members 
of that have their type, they should have to have members of the 
aliased struct containing their type.


More information about the Digitalmars-d mailing list