"Hiding" the mixin keyword?
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Sat Feb 24 01:31:36 PST 2007
> Frits van Bommel a écrit :
>> renoX wrote:
>>> It's weird though: Reiner Pope in its 'Mixin demo: associative array
>>> initializers (with support for comments)' (digitalmars.D) did a mixin
>>> inside the associative array initialisation template, hiding the
>>> mixin, but I don't manage to do the same things.
>> Looks like he hid the mixin() in a templated function call, using
>> property syntax to remove the trailing ().
>> I'm pretty sure that means he can't support variables in the
>> initializers, nor expressions containing variables.
>> It would seem these are quite important for a (runtime) string
>> formatter though. ;)
> My string formatter works at compile-time not runtime, but it generates
> an expression which contain runtime variable..
That's what I meant.
> So I guess that's why I need to have a mixin keyword at the call site,
> too bad.
> Thanks for your help.
More information about the Digitalmars-d-learn