[swift-evolution] [Idea] Omit argument labels from the call site when the argument is the same as the label
Kenny Leung
kenny_leung at pobox.com
Mon Feb 8 13:29:34 CST 2016
Hi Tino.
I think my idea is significantly different from yours. Making all labels optional feels more like a “reversion” of coding style to languages that don’t have argument labels. It would still let you call a function like this:
you.doYourThingWithThis(a, b, c, d, e)
thus making your code harder to read.
I think making them optional only when the variable name is the same as the label does not take away from the reader understanding exactly which method is being referred to.
-Kenny
> On Feb 8, 2016, at 9:31 AM, Tino Heth <2th at gmx.de> wrote:
>
> In another discussion, I proposed to make labels optional (call-side only) as long as they are not needed to choose the right method — but as there was no positive feedback from core, I didn't pursue further on this (although I still think it would be a good move, moving the whole burden of when to have labels and when to skip them out of the language itself)
More information about the swift-evolution
mailing list