[swift-evolution] [Proposal] Automating Partial Application via Wildcards
jgroff at apple.com
Tue Feb 2 13:43:25 CST 2016
> On Feb 2, 2016, at 11:31 AM, 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>
…and to be fair, I've also seen a lot of complaints about Swift that there are too many syntaxes for forming function values, so I'm hesitant to introduce yet more. If we had an awesome design that could *replace* some of the existing use cases, that might be more compelling.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution