On Sunday, 11 October 2015 at 05:52:45 UTC, Freddy wrote:
On Saturday, 10 October 2015 at 23:25:49 UTC, Manu wrote:
[...]

Speaking of DIP74 can't we just wrap a class in a struct with use reference counting with and use alias this?

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

Reply via email to