[swift-evolution] Colon vs. equals
clattner at apple.com
Mon Feb 8 13:16:27 CST 2016
> On Feb 5, 2016, at 3:27 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
> 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.
> What do I mean? Well, our language has this:
> myFunc(foo, bar: baz)
> But it also has:
> @available(iOS, introduced=7.0, deprecated=8.0)
As others have pointed out, dictionary literal syntax is structurally different than “call like” syntax. That said, I tend to agree with you that using colon instead of equals in @available would make sense.
More information about the swift-evolution