DMD 0.173 release [Name mangling]

Don Clugston dac at nospam.com.au
Fri Nov 3 00:48:59 PST 2006


Walter Bright wrote:
> Don Clugston wrote:
>> "Template instantiations can now accept alias parameters for local 
>> variables and nested functions."
>>
>> which is of great interest to me, since now meta.prettynameof!() can 
>> work with local variables; this will be significant for DDL and 
>> probably things like PyD as well.
>> But, the name mangling is really weird. It's totally different to the 
>> name mangling for static variables, for example.
> 
> What happens is when one of the parameters is an alias to a local, the 
> template becomes a *nested* class/function, and is mangled like one.

OK, that makes sense -- that should prevent the alias from 'leaking out' 
from the function. Might take me a while to get my head around all the 
consequences, though <g>. Opens up lots of possibilities.



More information about the Digitalmars-d-announce mailing list