Function pointers/delegates default args were stealth removed?

Carl Sturtivant sturtivant at gmail.com
Mon Aug 27 04:08:06 PDT 2012


>
> extern(C) void function( ref const(Vector2) v0, ref 
> const(Vector2) v1, ref const(Vector2) v2, ref const(Color) 
> color = Color.white, BlendMode blendMode = BlendMode.Disabled ) 
> fillTriangle2D;

If function pointers could be called with fewer than the 
prototypical number of arguments, and the remaining arguments be 
always initialized to their .init defaults, you could perhaps 
make this sort of thing work without the default argument values 
by using struct defaults.

How would that be deficient?



More information about the Digitalmars-d mailing list