What to do about default function arguments
Walter Bright
newshound2 at digitalmars.com
Wed Apr 25 21:10:14 PDT 2012
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.
More information about the Digitalmars-d
mailing list