[swift-evolution] [swift-evolution-announce] [Review] SE-0023 API Design Guidelines

Janosch Hildebrand jnosh at jnosh.com
Tue Feb 2 07:29:54 CST 2016


> On 02 Feb 2016, at 06:31, David Hart via swift-evolution <swift-evolution at swift.org> wrote:
> 
>> On 02 Feb 2016, at 01:38, Dave Abrahams via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> 
>>> What is your evaluation of the proposal?
>>> 
>>> I’m a big fan of guidelines like these so count me as a strong +1.
>>> 
>>> In general
>>> 
>>> I’m supportive of lowerCamelCase for enumerations. 
>>> I’m still not sure about the first argument label
>>> suggestions. Personally, I’d prefer that the first argument always
>>> include a label, but I know that is not a popular opinion.
>> 
>> What would you use for a label here, and why?
>> 
>>  someSet.remove(someElement)
> 
> Maybe I am misunderstanding, or maybe I am projecting my opinion, but I believe he meant that the first argument is explicit by default, like all other arguments. your example would just become (keeping the same use-site syntax):
> 
> func remove(_ element: Element)
> 
> Btw, if it wasn’t clear, that is also my opinion.
> 
> David.

I think it's important that we separate the discussions about the call site from the discussions about the declaration site.
This proposal is ultimately about and only about what the call site should look like and needs to remain focused on that.

There has been a lot of discussion in this thread about the "first argument" but it is often unclear (to me) whether someone is arguing in favor of having the argument be explicit at the call or declaration site... Obviously there seems to be support for making the first argument explicit by default at the declaration site so that should be discussed/proposed separately so that that can be settled as well.

- Janosch


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160202/98914d3e/attachment.html>


More information about the swift-evolution mailing list