Pretty please: Named arguments

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Feb 28 06:02:10 PST 2011


On 2/28/11 6:48 AM, Andrej Mitrovic wrote:
> I prefer using the equals sign:
> foo(action = "dofoo", times = 100)
>
> This is how Python does it.

// in a module far, far away
void fun(double x);

// In a module importing it
int x = 42;
fun(x = 43);


Andrei


More information about the Digitalmars-d mailing list