Improvement of format string. Re: Suggestion for a D project/std module: templated format

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sat Feb 24 00:23:59 PST 2007


renoX wrote:
> But there are remaining problems:
> -you need to call it like: mixin(putf!(...));
> the mixin keyword doesn't look nice, and when there is a problem at 
> compile time

> (I dont' undestand why it's needed: Reiner Pope in 'Mixin 
> demo: associative array initializers' manage to hide it him..)

I just answered this question in your thread "Re: "Hiding" the mixin 
keyword?" in d.D.learn.
For the people who don't want to go look it up:
-----
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. ;)
-----



More information about the Digitalmars-d mailing list