Reference counted containers prototype
Peter Alexander
peter.alexander.au at gmail.com
Mon Dec 26 17:09:02 PST 2011
On 26/12/11 5:25 PM, Andrei Alexandrescu wrote:
> (a) All interaction with the held object is done via opDispatch. In fact
> opDispatch can be engineered to statically enforce no reference to the
> held object escapes.
I have a separate, but very much related concern:
If the held object has a method with the same name as RefCounted (e.g.
asConst) then how do you call the held object's method instead of
RefCounted's method?
I've always felt very suspicious of opDispatch. It seems like exactly
the kind of thing that seems good when you look at simple cases, but
would cause subtle problems when used in conjunction with other D
features (e.g. UFCS).
I'm not yet convinced that opDispatch has been thoroughly explored
enough to be used in such a fundamental part of the standard library.
More information about the Digitalmars-d
mailing list