<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="">In addition, I think # and @ are very confusing since they are not one of the existing symbols in function name syntax.<div class=""><br class=""></div><div class="">-Richard<br class=""><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 22, 2017, at 15:25, Richard Wei &lt;<a href="mailto:rxrwei@gmail.com" class="">rxrwei@gmail.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="">I prefer the `foo(_)` option and keeping the one-colon-per-arg rule.<div class=""><br class=""></div><div class="">Intuition:</div><div class="">Underscore means no label. Colon means one argument.</div><div class="">foo(_:) – one arg with no label</div><div class="">foo(_) – no arg with no label</div><div class=""><br class=""></div><div class="">-Richard</div><div class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Feb 22, 2017, at 14:27, Jacob Bandes-Storch 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=""><div class="">Just to throw out some other options: foo(#) and foo(@).&nbsp;</div><div class=""><br class=""></div><div class="">(And you thought we'd gotten rid of # argument labels! 😉)</div><div class=""><br class=""><div class="gmail_quote"><div class="">On Wed, Feb 22, 2017 at 11:48 AM David Sweeris &lt;<a href="mailto:davesweeris@mac.com" class="">davesweeris@mac.com</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
&gt; On Feb 22, 2017, at 11:05 AM, Matthew Johnson &lt;<a href="mailto:matthew@anandabits.com" class="gmail_msg" target="_blank">matthew@anandabits.com</a>&gt; wrote:<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt;&gt; On Feb 22, 2017, at 12:30 PM, David Sweeris &lt;<a href="mailto:davesweeris@mac.com" class="gmail_msg" target="_blank">davesweeris@mac.com</a>&gt; wrote:<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; On Feb 22, 2017, at 7:48 AM, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="gmail_msg" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; I like this idea.&nbsp; I think you made the right choice of syntax given the alternatives considered.&nbsp; To me `foo(_)` and `foo(:)` equally imply presence of an argument.&nbsp; The former looks like an anonymous (unnamed) argument and the latter includes the colon which only follows an argument.&nbsp; Between the two `foo(:)` is the better choice because it doesn’t look like a pattern as has been pointed out.<br class="gmail_msg">
&gt;&gt;&gt;<br class="gmail_msg">
&gt;&gt;&gt; I’m going to do a little brainstorming to try and come up with something that works and doesn’t imply an argument at all but suspect I’ll come up empty handed.<br class="gmail_msg">
&gt;&gt;<br class="gmail_msg">
&gt;&gt; What about “foo(Void)”? It might be fairly easily confused with “foo(:Void)”, but in practice, how likely is it for someone to declare both `foo()` and `foo(_: Void)`?<br class="gmail_msg">
&gt;<br class="gmail_msg">
&gt; I almost threw out `foo(Void)` and `foo(Never)` as ideas.&nbsp; There is at least one problem with these.&nbsp; We will hopefully eventually get rid of the need to say `.self` in expressions like `Int.self`.&nbsp; If we are able to do that then `foo(Void)` and `foo(Never)` are syntactically valid function calls.<br class="gmail_msg">
<br class="gmail_msg">
Oh, good point! Hrmm… “foo(#null)”/“foo(#nullary)"? I can’t imagine either of those would ever be valid function calls, and they get the point across (the later more than the former, but it’s more to type). I don’t like that syntax for the name of “shortest” version of the function isn’t shorter than the syntax of the name for other versions of the function, though.<br class="gmail_msg">
<br class="gmail_msg">
- Dave Sweeris</blockquote></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></div></div></blockquote></div><br class=""></div></div></div></body></html>