[swift-evolution] When to use argument labels, part DEUX (was: when to use argument labels (a new approach))

Thorsten Seitz tseitz42 at icloud.com
Sat Feb 6 12:42:47 CST 2016


Err, yes, that's what I meant. 'Optional' at the call site due to the default, but of course 'optional' is a bad choice of wording due to the optional type. Thanks.

-Thorsten 

> Am 06.02.2016 um 18:44 schrieb Matthew Judge <matthew.judge at gmail.com>:
> 
> If the argument has a default.
> 
>> On Feb 6, 2016, at 12:21, Thorsten Seitz <tseitz42 at icloud.com> wrote:
>> 
>> So the preposition should move into the argument label if the argument is optional?
>> 
>> copy(withZone: zone = nil)
>> 
>> -Thorsten 
>> 
>> 
>>> Am 06.02.2016 um 14:45 schrieb Matthew Judge via swift-evolution <swift-evolution at swift.org>:
>>> 
>>> Very first method
>>> 
>>> copyWith(zone: Zone = nil)
>>> 
>>> can be called as
>>> 
>>> copyWith()
>>> 
>>> I'm assuming this is still something we don't want right?
>>> 
>>>> On Feb 6, 2016, at 02:16, Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
>>>> 
>>>> 
>>>>> On Feb 5, 2016, at 1:32 PM, Dave Abrahams via swift-evolution <swift-evolution at swift.org> wrote:
>>>>> 
>>>>> 
>>>>> Given all the awesome feedback I've gotten on this thread, I went back
>>>>> to the drawing board and came up with something new; I think this one
>>>>> works.  The previously-stated goals still apply:
>>>> 
>>>>> [snip goals]
>>>> 
>>>>> P.S. Doug is presently working on generating new importer results, based
>>>>>     on these guidelines, for your perusal.  They should be ready soon.
>>>> 
>>>> 
>>>> Here’s a link:
>>>> 
>>>> 	https://github.com/apple/swift-3-api-guidelines-review/pull/10/files
>>>> 
>>>> Feedback welcome!
>>>> 
>>>> 	- Doug
>>>> 
>>>> _______________________________________________
>>>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160206/88ff32c6/attachment.html>


More information about the swift-evolution mailing list