[swift-evolution] [Discussion] Determining argument count from context
Paul Cantrell
cantrell at pobox.com
Sun Jul 3 16:15:15 CDT 2016
This is filed here:
https://bugs.swift.org/browse/SR-586
There was some discussion about it on the list about whether this is a bug or a dubious feature. Douglas Gregor recently weighed in on that:
> I consider this a bug. The removal of implicit tuple splats should, IMO, encompass making $0 consistently capture the first argument. I’d love for this to happen in Swift 3.
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160627/022448.html
Cheers, P
> On Jul 3, 2016, at 4:04 PM, Anton Zhilin via swift-evolution <swift-evolution at swift.org> wrote:
>
> [1,2,3].reduce(0) { $1 } //=> 3
> [1,2,3].reduce(0) { $0 } // error :(
>
> Am I requesting too much from type checker?
> Will recent function type proposals resolve the issue?
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list