[swift-evolution] [Pitch] Make the first parameter in a function declaration follow the same rules as the others
Shawn Erickson
shawnce at gmail.com
Mon Mar 14 18:01:46 CDT 2016
I could have easily screwed up my grep but doing spot checks on the
resulting data sets I didn't spot an issue. I did make assumptions about
how well formed the data set was.
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:554]> grep -R "func [A-Za-z0-9]*([A-Za-z0-9]* [A-Za-z0-9]*:" Platforms/
| wc -l
10587
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:555]> grep -R "func [A-Za-z0-9]*(_ [A-Za-z0-9]*:" Platforms/ | wc -l
21654
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:556]> grep -R "func [A-Za-z0-9]*([A-Za-z0-9]* _:" Platforms/ | wc -l
0
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:557]> grep -R "func [A-Za-z0-9]*([A-Za-z0-9]*:" Platforms/ | wc -l
14
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:558]> grep -R "func [A-Za-z0-9]*()" Platforms/ | wc -l
7190
----
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:559]> grep -R "func [A-Za-z0-9]*([A-Za-z0-9]* [A-Za-z0-9]*:" SampleCode/
| wc -l
12
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:560]> grep -R "func [A-Za-z0-9]*(_ [A-Za-z0-9]*:" SampleCode/ | wc -l
0
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:561]> grep -R "func [A-Za-z0-9]*([A-Za-z0-9]* _:" SampleCode/ | wc -l
0
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:562]> grep -R "func [A-Za-z0-9]*([A-Za-z0-9]*:" SampleCode/ | wc -l
512
[shawnce:~/Downloads/swift-3-api-guidelines-review-swift-3]
[0:563]> grep -R "func [A-Za-z0-9]*()" SampleCode/ | wc -l
221
On Mon, Mar 14, 2016 at 3:28 PM Dave Abrahams via swift-evolution <
swift-evolution at swift.org> wrote:
>
> on Sun Mar 13 2016, Shawn Erickson <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> 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
> >>
> >
> > 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
>
> Are you certain? Last we checked it was about 50/50 between having and
> not-having a distinct argument label.
>
> --
> -Dave
>
> _______________________________________________
> 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/1d576b87/attachment.html>
More information about the swift-evolution
mailing list