On 3/1/11 1:51 AM, Lars T. Kyllingstad wrote:
I think I agree with you and Don here.  As for "skipping" default
parameters, I suggest the following syntax:

   void foo(int i, bool b = true, real r = 3.14, string s = "")
   { ... }

   foo(1, , , "Hello World!");

This is a much smaller language change than named parameters.

-Lars

When reading existing code, can you easily spot the difference between:
        foo(1,,, "Hello World!");
and
        foo(1,,,, "Hello World!");
?

Unlike named arguments, I'd argue this syntax makes things quite a bit /less/ readable.

Reply via email to