Function pointers/delegates default args were stealth removed?
Walter Bright
newshound2 at digitalmars.com
Sun Aug 26 17:44:07 PDT 2012
On 8/26/2012 4:50 PM, Timon Gehr wrote:
> On 08/27/2012 12:41 AM, Walter Bright wrote:
>>
>> The trouble for function pointers, is that any default args would need
>> to be part of the type, not the declaration.
>>
>
> They could be made part of the variable declaration.
You mean part of the function pointer variable?
Consider what you do with a function pointer - you pass it to someone else. That
someone else gets it as a type, not a declaration. I.e. you lose the default
argument information, since that is not attached to the type.
More information about the Digitalmars-d
mailing list