[swift-evolution] [Proposal] Automating Partial Application via Wildcards

Christopher Whidden christopher.whidden at gmail.com
Tue Feb 2 14:03:39 CST 2016

After the removal of function currying in SE-0002, it seemed like partial application would be a sensible improvement to the general problem that function currying was trying to solve.  Scala-like partial application was even mentioned as an alternative in that proposal.
I was even thinking of writing up a proposal for this myself.

Joe’s arguments and his links have me pretty quickly convinced that this isn’t a great direction for Swift, especially with underscores.  Admittedly, this was always just a pure sugar feature, but I no longer think it has any redeeming qualities over Swift’s existing closure syntax with either $N parameters or named parameters.

Thanks for writing the proposal, Erica and Davide, but I’m -1 on this.

> On Feb 2, 2016, at 1:31 PM, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
>> On Feb 2, 2016, at 11:14 AM, Matthew Johnson <matthew at anandabits.com <mailto:matthew at anandabits.com>> wrote:
>> I know there is concern about overloading the semantics of `_` which is unfortunate as IMO it is the best symbol to serve as a placeholder.  I wonder if there has been confusion about the semantics in practice in languages like Scala where it is used in both ways.  Is there any evidence that this has been a problem?
> Not a super scientific study, but if you google "scala underscore", several of the results on the first page indicate confusion or bewilderment:
> Scala _ [underscore] magic · Anantha Kumaran <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwj-08ju59nKAhWj26YKHRuVBh8QFggdMAA&url=http%3A%2F%2Fananthakumaran.in%2F2010%2F03%2F29%2Fscala-underscore-magic.html&usg=AFQjCNEbIIoppVNYAjr6wqxL4byR9I1fAw&sig2=Hlw6hEFfsPqvlDvEFaDoyQ>
> What are all the uses of an underscore in Scala? - Stack ... <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&ved=0ahUKEwj-08ju59nKAhWj26YKHRuVBh8QFggjMAE&url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F8000903%2Fwhat-are-all-the-uses-of-an-underscore-in-scala&usg=AFQjCNHVNCJVosr0IzZYmh8pJRdnXTnf6g&sig2=vqWgzaddf2kEkWrdgFQuoQ&bvm=bv.113034660,d.dGY>
> Scala dreaded underscore - SlideShare <https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0ahUKEwj-08ju59nKAhWj26YKHRuVBh8QFggqMAI&url=http%3A%2F%2Fwww.slideshare.net%2Fnormation%2Fscala-dreaded&usg=AFQjCNEs5fGA4e8NsU10--FKfOyga8aEaA&sig2=mlWWAnJgFVxSpA4UtA2wyw>
> underscore confusion | The Scala Programming Language <http://www.scala-lang.org/old/node/2916.html>
> -Joe
> _______________________________________________
> 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/20160202/0f525551/attachment.html>

More information about the swift-evolution mailing list