Edited 4 years ago by Marc
When you have a method with optional parameters:
func Test(a = 1, b = 2) {}
and you only want to provide argument "b", then you have to do this:
Test( , "value for b")
This looks a bit messy imho.
In other languages I've always used named arguments, when available there, like this:
Test(b: "only value b")
Or:
Test(b: "value b", a: "value a")
NB: With named arguments, sequence doesn't matter.
I personally find using named arguments, albeit more verbose (for some ...), gives better code readability and, as a bonus, is less prone to errors (if you f.e. use the wrong sequence).