this is almost a workaround for the lack of named parameters

foobar foo at bar.com
Mon Mar 25 05:39:39 PDT 2013


On Saturday, 23 March 2013 at 15:59:12 UTC, Jacob Carlborg wrote:
> On 2013-03-23 16:55, John Colvin wrote:
>
>> A simple example is matplotlib.pyplot.plot
>>
>> There are so many possible flags and parameters that can be 
>> passed in
>> order to get the exact behaviour you want, but commonly you'll 
>> only want
>> a few set for each call. You don't want to have to set all the 
>> other
>> preceding parameters, you just want to go e.g. plot(data, 
>> linewidth=5)
>
> I've heard it was a big boost for C# when it got support for 
> default arguments and named parameters. It made it a lot easier 
> to integrate with COM.

AFAIK, this is only relevant or useful for COM (i.e. to support 
legacy, not really OO code) and is not supported (compile error?) 
for regular C# code as it is *not idiomatic C#* style (and is not 
OO).


More information about the Digitalmars-d mailing list