Both shared & local classes, method selection
Dicebot via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Aug 29 06:39:00 PDT 2014
http://dpaste.dzfl.pl/2a17662ce5b0
Doing completely separate implementation based on sharedness may
be a bit more tricky. std.typecons.Proxy comes to my mind
immediately but it does not allow proxying two objects with same
method names.
At the same time it does not sound like a good idea to me. If I'd
encounter code that magically picks totally different
implementation based on shared qualified I'd call it a smart ass
one and never accepted it through code review :) Such things
really need to be explicit, magic is worst enemy of
multi-threading
More information about the Digitalmars-d-learn
mailing list