<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">There are things in Scala that flummoxed me early on - the underscore is not one of them. &nbsp;It is just new syntax - similar to using $0 or something else that if you have not seen before or know what it is used for it throws you to begin with. &nbsp;<div class=""><br class=""></div><div class="">It can always be taken to the extreme in a straw man argument to make a point, but for me it was definitely not an issue.</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 2016-02-03, at 2:42:44, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 2, 2016, at 1:31 PM, Joe Groff &lt;<a href="mailto:jgroff@apple.com" class="">jgroff@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 2, 2016, at 11:14 AM, Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" class="">matthew@anandabits.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">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. &nbsp;I wonder if there has been confusion about the semantics<span class="Apple-converted-space">&nbsp;</span></span><b class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">in practice</b><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">&nbsp;in languages like Scala where it is used in both ways. &nbsp;Is there any evidence that this has been a problem?</span></div></blockquote></div><br class=""><div class="">Not a super scientific study, but if you google "scala underscore", several of the results on the first page indicate confusion or bewilderment:</div><div class=""><br class=""></div><div class=""><h3 class="r" style="font-size: 18px; font-weight: normal; margin: 0px; padding: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(34, 34, 34); font-family: arial, sans-serif;"><a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0ahUKEwj-08ju59nKAhWj26YKHRuVBh8QFggdMAA&amp;url=http%3A%2F%2Fananthakumaran.in%2F2010%2F03%2F29%2Fscala-underscore-magic.html&amp;usg=AFQjCNEbIIoppVNYAjr6wqxL4byR9I1fAw&amp;sig2=Hlw6hEFfsPqvlDvEFaDoyQ" style="color: rgb(102, 0, 153); cursor: pointer; text-decoration: none;" class="">Scala _ [underscore] magic · Anantha Kumaran</a></h3><div class=""><br class=""></div></div><div class=""><h3 class="r" style="font-size: 18px; font-weight: normal; margin: 0px; padding: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(34, 34, 34); font-family: arial, sans-serif;"><a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=2&amp;ved=0ahUKEwj-08ju59nKAhWj26YKHRuVBh8QFggjMAE&amp;url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F8000903%2Fwhat-are-all-the-uses-of-an-underscore-in-scala&amp;usg=AFQjCNHVNCJVosr0IzZYmh8pJRdnXTnf6g&amp;sig2=vqWgzaddf2kEkWrdgFQuoQ&amp;bvm=bv.113034660,d.dGY" style="color: rgb(102, 0, 153); cursor: pointer; text-decoration: none;" class="">What are all the uses of an underscore in Scala? - Stack ...</a></h3><div class=""><br class=""></div><h3 class="r" style="font-size: 18px; font-weight: normal; margin: 0px; padding: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(34, 34, 34); font-family: arial, sans-serif;"><a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=3&amp;ved=0ahUKEwj-08ju59nKAhWj26YKHRuVBh8QFggqMAI&amp;url=http%3A%2F%2Fwww.slideshare.net%2Fnormation%2Fscala-dreaded&amp;usg=AFQjCNEs5fGA4e8NsU10--FKfOyga8aEaA&amp;sig2=mlWWAnJgFVxSpA4UtA2wyw" style="color: rgb(102, 0, 153); cursor: pointer; text-decoration: none;" class="">Scala dreaded underscore - SlideShare</a></h3><div class=""><br class=""></div></div><div class=""><h3 class="r" style="font-size: 18px; font-weight: normal; margin: 0px; padding: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgb(34, 34, 34); font-family: arial, sans-serif;"><a href="http://www.scala-lang.org/old/node/2916.html" style="color: rgb(102, 0, 153); cursor: pointer; text-decoration: none;" class="">underscore confusion | The Scala Programming Language</a></h3><div class=""><br class=""></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">Interesting. &nbsp;It looks like Scala takes this to a crazy extreme. &nbsp;I can definitely see why the core team is cautious about avoiding this mistake. &nbsp;</div><div class=""><br class=""></div><div class="">The example in the last link you shared is a pretty strong argument for avoiding partial application syntax (regardless of placeholder). &nbsp;It took me a minute to see what was happening there, while it would have been immediately clear with closure braces.</div><div class=""><br class=""></div><div class="">The thing I like about _ as a placeholder is the visual whitespace it leaves. &nbsp;It <i class="">looks</i><b class="">&nbsp;</b>like a “hole” in the expression. &nbsp;I wish there was some other unclaimed symbol with that attribute. &nbsp;</div><div class=""><br class=""></div><div class="">It would be nice if we could find something better than $. &nbsp;The best argument in favor of that is precedent in other languages, but it comes at the cost of being noisy enough to impede readability IMO.</div><div class=""><br class=""></div><div class="">-Matthew</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">-Joe</div></div></div></blockquote></div><br class=""></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></body></html>