automatic mixin in classes

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Mon Nov 5 08:26:01 PST 2012


I don't see anything related to this issue.


On Sun, Oct 28, 2012 at 5:41 AM, Chris Nicholson-Sauls <
ibisbasenji at gmail.com> wrote:

> On Saturday, 27 October 2012 at 05:39:59 UTC, Gor Gyolchanyan wrote:
>
>> I've stumbled upon this numerous times and I wish I could automate this
>> somehow.
>> The idea is to have some mixin templates mixed into classes automatically
>> when they inherit from some base class.
>> For instance, advanced RTTI methods, which analyze the enclosing class at
>> compile-time.
>> Unfortunately, AFAIK, there's no way of doing it automatically and one
>> needs to both derive from a certain class and mix in a certain mixin
>> template manually.
>> Is there a way to avoid the boilerplate and have it done automatically?
>>
>
> Does this give you any ideas on how to solve your use cases:
> https://github.com/csauls/**zeal.d/blob/master/source/**
> zeal/base/controller.d<https://github.com/csauls/zeal.d/blob/master/source/zeal/base/controller.d>
> https://github.com/csauls/**zeal.d#controllers<https://github.com/csauls/zeal.d#controllers>
> https://github.com/csauls/**zeal.d/blob/master/source/**
> zeal/http/router.d#L93<https://github.com/csauls/zeal.d/blob/master/source/zeal/http/router.d#L93>
>
> -- Chris Nicholson-Sauls
>
>


-- 
Bye,
Gor Gyolchanyan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121105/e8551219/attachment.html>


More information about the Digitalmars-d mailing list