Re: Private and Package dynamic dispatch, implemented as a library template!

2013-03-30 Thread Andrej Mitrovic
On 3/30/13, Andrej Mitrovic wrote: > On 3/30/13, Andrej Mitrovic wrote: >> The full implementation: http://dpaste.dzfl.pl/08278225 > > Woops! It looks like it may have to become a mixin, since CanCall will > fail to call private methods. So maybe the API would look like: > > mixin DynamicDispatch

Re: Private and Package dynamic dispatch, implemented as a library template!

2013-03-30 Thread Andrej Mitrovic
On 3/30/13, Andrej Mitrovic wrote: > The full implementation: http://dpaste.dzfl.pl/08278225 Woops! It looks like it may have to become a mixin, since CanCall will fail to call private methods. So maybe the API would look like: mixin DynamicDispatch!(C, D, E) dynamic;

Private and Package dynamic dispatch, implemented as a library template!

2013-03-30 Thread Andrej Mitrovic
A few months ago I posted this: http://forum.dlang.org/thread/mailman.1030.1360125437.22503.digitalmar...@puremagic.com And this wiki page: http://wiki.dlang.org/Dispatching_an_object_based_on_its_dynamic_type But now I've implemented a similar feature for class methods. Let's say you have a cla