"Hiding" the mixin keyword?

renoX renosky at free.fr
Sat Feb 24 00:47:56 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..

So I guess that's why I need to have a mixin keyword at the call site, 
too bad.

Thanks for your help.

renoX


More information about the Digitalmars-d-learn mailing list