Hi Shin,

This is solid work! There's an opportunity here - it overlaps a LOT with std.variant.Algebraic.

Essentially it would be best if you integrated opDispatch, _onActiveDuck, and friends inside Algebraic. Then Algebraic would become meta-duck - it still supports any combination of types, but you can call any method they share against the Algebraic.

What do you think?


Andrei

P.S. I *love* the trick with the homonym inner namespace! It solves the naming problem so elegantly. I'll use it in RefCounted too.

On 07/08/2010 05:07 AM, dsource.org wrote:
phobos commit, revision 1737


user: rsinfu

msg:
[devel] std.typecons.Any for ad-hoc polymorphism on duck-typed objects

http://www.dsource.org/projects/phobos/changeset/1737

_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to