What to do about default function arguments

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu Apr 26 10:45:55 PDT 2012


On 26/04/12 19:25, Jonathan M Davis wrote:
> There is an _enormous_ difference between disallowing default arguments in
> general and disallowing them in function pointers and delegates.

I think maybe I've misunderstood the problem.  Are we talking about default 
values _of the function pointer_ or that get passed to the function pointer?

i.e. are we talking about,

     int foo(int delegate() dg = &bar) {
         ...
     }

or about

     int foo(int delegate() dg = &bar) {
         bar();  // assumes default arguments for bar
     }

...?


More information about the Digitalmars-d mailing list