What to do about default function arguments
Sean Kelly
sean at invisibleduck.org
Thu Apr 26 08:06:59 PDT 2012
On Apr 25, 2012, at 9:10 PM, Walter Bright <newshound2 at digitalmars.com> wrote:
> On 4/25/2012 8:44 PM, Walter Bright wrote:
>> The problem centers around name mangling. If two types mangle the same, then
>> they are the same type. But default arguments are not part of the mangled
>> string. Hence the schizophrenic behavior.
>
> One might suggest mangling the default argument into the type. But default arguments need not be compile time constants - they are evaluated at runtime! Hence the unattractive specter of trying to mangle a runtime expression.
Sounds to me like you just answered your own question :-)
More information about the Digitalmars-d
mailing list