<div dir="ltr">Interesting point, I guess ":" in dictionary literals is to make the syntax unambiguous.<div><br></div><div>This is currently valid swift:</div><div><br></div><div> <font face="monospace, monospace">let x = [a = b]</font></div><div><br></div><div>Its type is: Array<<font face="monospace, monospace">Void></font>. It seems like the syntax is clearer if the delimiter isn't a valid operator.</div><div><br></div><div>Also there's a problem with default value syntax:</div><div><br></div><div> <font face="monospace, monospace">func test(a: Int = 123)</font></div><div><br></div><div>This would be hard to read with only "=":</div><div><br></div><div><font face="monospace, monospace"> func test(a = Int = 123)</font><br></div><div><br></div><div>Also if the default value was an operator:</div><div><br></div><div><font face="monospace, monospace"> func test(a = Int -> Int = =)</font></div><div><font face="monospace, monospace"><br></font></div>Granted you could change the less commonly used default syntax, but it's probably syntactically easier to differentiate user-controller delimiters (assignment) and compiler-controller delimiters (:,). The example with assignment in an array illustrates this.<div><br></div><div>I do agree '<span style="font-size:13px"><font face="monospace, monospace">@available</font>'</span> though, it seems like it should be ":"</div><div><br></div><div>=)</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 6, 2016 at 10:27 AM, Brent Royal-Gordon via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is perhaps a bit nitpicky, but I've noticed that Swift sometimes uses colon to separate names and values, and sometimes uses equals. It's vaguely maddening.<br>
<br>
What do I mean? Well, our language has this:<br>
<br>
myFunc(foo, bar: baz)<br>
<br>
But it also has:<br>
<br>
@available(iOS, introduced=7.0, deprecated=8.0)<br>
<br>
You create a dictionary like this:<br>
<br>
let dict = ["key": "value"]<br>
<br>
But you set it like this:<br>
<br>
dict["key"] = "value"<br>
<br>
Is there some principle here? The @available case seems particularly strange to me, because those values read strongly like parameters to me.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Brent Royal-Gordon<br>
Architechies<br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</font></span></blockquote></div><br></div>