Function pointers/delegates default args were stealth removed?

Carl Sturtivant sturtivant at gmail.com
Mon Aug 27 03:00:48 PDT 2012


On Monday, 27 August 2012 at 08:26:15 UTC, Jonathan M Davis wrote:
> On Monday, August 27, 2012 08:14:41 Piotr Duda wrote:
>> Default args should be part of types (for passing them as 
>> template
>> args etc, implicity convertable if they differs only on 
>> defaults) but
>> not mangled in (since mangling is revelant only for linking, 
>> where
>> defaults doesn't matter).
>
> Default args are essentially copy-pasted at the call point. It 
> makes no sense
> for them to be part of the type, and it makes no sense to use 
> them with
> function pointers or function literals.

Agreed. So see my way of simulating these at run-time without 
adverse type consequences or any overhead for existing functions.




More information about the Digitalmars-d mailing list