[swift-evolution] [Pitch] Enforce argument order for defaulted parameters

T.J. Usiyan griotspeak at gmail.com
Mon Apr 4 02:23:14 CDT 2016


+1

I use it but won't fight for it or miss it.

On Thu, Mar 31, 2016 at 12:45 PM, Javier Soto via swift-evolution <
swift-evolution at swift.org> wrote:

> I have never taken advantage of this. In fact, I didn't know this was
> possible until just now :) and I would've definitely found it confusing to
> see a function call with "out of order" parameters.
> On Thu, Mar 31, 2016 at 7:58 AM Developer via swift-evolution <
> swift-evolution at swift.org> wrote:
>
>> +1
>>
>> ~Robert Widmann
>>
>> 2016/03/31 10:26、Jeff Kelley via swift-evolution <
>> swift-evolution at swift.org> のメッセージ:
>>
>> I have never taken advantage of this, personally. Given that there isn’t
>> anything that this feature enables that can’t be done if it’s removed—aside
>> from reordering arguments—I’d be in favor of removing it for simplicity’s
>> sake.
>>
>> Jeff Kelley
>>
>> SlaunchaMan at gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> |
>> jeffkelley.org
>>
>> On Mar 30, 2016, at 12:59 PM, Joe Groff via swift-evolution <
>> swift-evolution at swift.org> wrote:
>>
>> Many people are surprised when they find out defaulted parameters can be
>> reordered, unlike required arguments. This special case adds complexity to
>> the language, and runs against our general trend of treating argument
>> labels as a significant part of an API's name, and preferring a single way
>> of writing API calls. I think it's worth revisiting this design choice—is
>> the special case worth the complexity? How many people take advantage of
>> default argument reordering?
>>
>> -Joe
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
>> _______________________________________________
>> swift-evolution mailing list
>> swift-evolution at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-evolution
>>
> --
> Javier Soto
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160404/625ce534/attachment.html>


More information about the swift-evolution mailing list