Pretty please: Named arguments

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Feb 28 06:16:49 PST 2011


On 2/28/11, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
> 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
>

Yes, I've mentioned I was wrong in my next-to-last post. :)


More information about the Digitalmars-d mailing list