[swift-evolution] Colon vs. equals
Charles Constant
charles at charlesism.com
Sat Feb 6 11:33:47 CST 2016
+0.9 for changing Dict to use "=" for assignment instead of ":"
It's hard to unreservedly support. It would affect an awful lot of code. It
would cause problems porting snippets from other languages. It will confuse
programmers who come to Swift from other languages. It would attract the
passionate and permanent wrath of a large portion of Swift programmers.
And, to my eye, "=" is less well suited, visually, than ":" as a separator,
if you're looking at a tree of data.
On the other hand, it's a lot Swift-er. It does seem odd, when you step
back, to see the ":" used differently in a Dict than in a function argument
or a ternary expression. If one were to get use to "=" being used
consistently, I suspect anything else would seem backward.
Consistency is important to me, and I would support the change.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160206/0e6dd1c2/attachment.html>
More information about the swift-evolution
mailing list