I'm not sure I like the overloading of the "out" keyword for covariant type parameters, but otherwise, pretty cool.
foo({ 'name': 'bar', 'title': 'Bar' });
This means not having to look up what the exact order of options are, nor having to pass in a bunch of null parameters because the one you want is the last parameter. Very cool.
}
Obviously, all IMO.
I do, however, have intellisense in my eyes.
var c = new Cube(1, 2, 3)
or: var c = new Cube(height: 1, width: 2, depth: 3); var c = new X(3, "blue", null, null, null, null, false, true, null, 1, null);
(which, sadly, is an all too common implementation pattern), you can have: var c = new X(foo: 3, bar: "blue", baz: false, quux: true, wibble: 1);
Which seems quite a bit better.Another advantage of named/optional parameters is that you can use them in the construction of immutable objects, whereas you don't get that advantage if you use settable properties.