[swift-evolution] Colon vs. equals
cocoadev at charlessoft.com
Sat Feb 6 18:33:43 CST 2016
> On Feb 6, 2016, at 6:26 PM, Charles Constant via swift-evolution <swift-evolution at swift.org> wrote:
> let dict = ["key" = "value"]
> I'm having buyer's remorse over supporting this. At first glance, it looks like it's overloading an assignment operator... to a string literal. I know that's not what's really going on under the hood, but on a surface level it just looks very ugly :(
If you think that's ugly, just imagine what it will look like to initialize an empty one.
let foo: [String = Int] = [=]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution