DMD 1.005 release

Don Clugston dac at nospam.com.au
Tue Feb 13 02:47:59 PST 2007


Walter Bright wrote:
> Bruno Medeiros wrote:
>> Well, actually you can do that, with the unannounced (in the 
>> changelog) .stringof property ( 
>> http://www.digitalmars.com/d/property.html ) :
>>
>> ----
>>
>> template MakeVariable(Type, char[] name)
>> {
>>   const char[] MakeVariable = Type.stringof ~ " " ~ name ~ ";";
>> }
> 
> It's unannounced because it doesn't work right yet.

<trashes meta.nameof>
It was a piece of code I was particularly proud of. Ah well.
</trashes>

It seems that 90% of the metaprogramming code I've ever written has been 
made obsolete by being incorporated into the code language.
My 'workarounds' file went from 16 entries to zero.

But the ability to do it for an expression as well is quite exciting; it 
seems that this could easily supercede lazy parameters.
So I'm not complaining <g>.



More information about the Digitalmars-d-announce mailing list