Defining some stuff for each class in turn

Max Samukha spambox at d-coding.com
Thu Oct 1 11:05:10 PDT 2009


On Thu, 01 Oct 2009 11:25:03 -0500, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:

>I am becoming increasingly aware that we need to provide some means to 
>define certain members (data and functions) for each class as if they 
>were pasted there.
>

I am glad you have finally bumped into the problem. It has been
waiting for a solution for quite some time.

For example, the upcoming reflection mechanism in QtD (which uses its
own metaobjects instead of the limited classinfo) requires manual
insertion of a mixin into derived classes unless the mixin is inserted
implicitly when a signal/property/etc is declared.

A couple of votes for the feature.




More information about the Digitalmars-d mailing list