DMD 1.005 release

Andrei Alexandrescu (See Website For Email) SeeWebsiteForEmail at erdani.org
Fri Feb 9 22:53:31 PST 2007


janderson wrote:
> Andrei Alexandrescu (See Website For Email) wrote:
>> janderson wrote:
>>> Yauheni Akhotnikau wrote:
>>>> On Thu, 08 Feb 2007 10:08:29 +0300, Walter Bright 
>>>> <newshound at digitalmars.com> wrote:
>>>>
>>
>> Probably an easier way to go would be:
>>
>> class A
>> {
>>   ...
>>   int x;
>>   B y;
>>   int z;
>> }
>>
>> mixin(serialize!(A, "x=10, y"));
> 
> I'm not sure I'd need a mixin for this.

Oh, indeed. A template instantiation is all that's needed. (It would use 
mixins inside for parsing the spec string.)


Andrei



More information about the Digitalmars-d-announce mailing list