<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Same for me. I would like to see the syntax changed for @available but think that we should stick to the colon for dictionaries and function calls.<div class=""><br class=""></div><div class="">- Alex</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 08 Feb 2016, at 11:42, Thorsten Seitz via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div class=""><div class="">I like the current usage of the colon as it is very readable and unobstrusive.<br class=""></div><div class=""><br class=""></div><div class="">I agree that @available should use colons, too.<br class=""></div><div class=""><br class=""></div><div class="">-Thorsten</div><div class=""><br data-mce-bogus="1" class=""></div></div><div class=""><br class="">Am 07. Februar 2016 um 20:19 schrieb ilya via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>>:<br class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="msg-quote"><div dir="ltr" class="">I know it's a bit late to the party :) but I have to disagree with the original premise.<div class="">The colon in the dictionary doesn't really separate names and values, it separates values and values:</div><div class=""><br class=""></div><div class="">["something" + "else" : 1 + 2] </div><div class=""><br class=""></div><div class="">is a perfectly valid dictionary that doesn't read nor write anything by name. In other words, there are no lhs-expressions there and that's ok.</div><div class=""><br class=""></div><div class="">We use = to rebind the names or, more generally, call setters, and when we do this an lhs-expression is required, well, on the left side of an assignment operator. This is in no way related to what happens with the dictionary. </div><div class=""><br class=""></div><div class="">The situation is different with function parameters. We don't really pass a dictionary; if we did, we'd use something like myFunc("":foo, "bar": baz) as a syntax. </div><div class=""><br class=""></div><div class="">One can attempt to read the syntax as binding names that the function can use as parameters, but this doesn't really work either: we only know the parameter's external names and this binding doesn't "leak" into the original scope. So if we are thinking about function call as an assignment, then it should be in an extremely short-lived scope contained within a function call. It doesn't look like this view will bring us any benefits. </div><div class=""><br class=""></div><div class="">I think it's best to imagine the colon in function calls as simply a third punctuation symbol. We do need to select a simple, readily available symbol that cannot be easily mixed with colon-inside-the-dictionary and regular-assignment-symbol, yet is still instantly recognisable. Reusing the colon is a reasonable compromise, although => would also work (and I wish it was given serious consideration). </div><div class=""><br class=""></div><div class="">Though I agree that it seems a bit excessive to have a separate syntax for @available's parameters.</div><div class=""><br class=""></div><div class="">Ilya.</div><div class=""> </div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Feb 6, 2016 at 12:27 AM, Brent Royal-Gordon via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" data-mce-href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0 0 0 0.8ex; border-left: 1px #ccc solid; padding-left: 1ex;" data-mce-style="margin: 0 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 class=""> <br class=""> What do I mean? Well, our language has this:<br class=""> <br class=""> myFunc(foo, bar: baz)<br class=""> <br class=""> But it also has:<br class=""> <br class=""> @available(iOS, introduced=7.0, deprecated=8.0)<br class=""> <br class=""> You create a dictionary like this:<br class=""> <br class=""> let dict = ["key": "value"]<br class=""> <br class=""> But you set it like this:<br class=""> <br class=""> dict["key"] = "value"<br class=""> <br class=""> Is there some principle here? The @available case seems particularly strange to me, because those values read strongly like parameters to me.<br class=""> <span class="HOEnZb"><span style="color: #888888;" data-mce-style="color: #888888;" class=""><br class=""> --<br class=""> Brent Royal-Gordon<br class=""> Architechies<br class=""> <br class=""> _______________________________________________<br class=""> swift-evolution mailing list<br class=""> <a href="mailto:swift-evolution@swift.org" data-mce-href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" data-mce-href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""> </span></span></blockquote></div><br class=""></div><div class="_stretch"><span class="body-text-content">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" data-mce-href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" data-mce-href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></span></div></div></blockquote></div></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="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>