[swift-evolution] [Pitch] Make the first parameter in a function declaration follow the same rules as the others

Radosław Pietruszewski radexpl at gmail.com
Mon Mar 14 05:43:10 CDT 2016


Interesting — but I don’t think framework APIs are necessarily representative of Swift usage at large. I suspect most Swift being done today is in application contexts. And, I don’t have the exact numbers, but when I played around with extracting method signatures from my projects, it seemed like the *majority* of methods should continue to be `func foo(bar: T)`, not `func foo(bar bar: T)`.

— Radek

> On 13 Mar 2016, at 23:29, Shawn Erickson via swift-evolution <swift-evolution at swift.org> wrote:
> 
> On Fri, Mar 11, 2016 at 1:30 PM Dave Abrahams via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> 
> Anyone who wants to measure is free to do so: simple regexps and wc generally work for this purpose.
> 
> https://github.com/apple/swift-3-api-guidelines-review/tree/swift-3/Platforms <https://github.com/apple/swift-3-api-guidelines-review/tree/swift-3/Platforms>
> 
> Not sure if anyone actually got around to this so doing a basic set of regex (includes class functions and overrides)...
> 
> func foo(bar baz:Baz... ---> 10544
> func foo(baz:Baz... ---> 526
> func foo(_:Baz... ---> 92
> func foo() ---> 7392
> _______________________________________________
> 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/20160314/c324c4e9/attachment.html>


More information about the swift-evolution mailing list