[swift-evolution] Colon vs. equals
possen at gmail.com
Sat Feb 6 23:00:38 CST 2016
I agree the = does not look good in this context. Think of the colon as a very thin equal sign, then there is no issue. :-)
> On Feb 6, 2016, at 4:33 PM, Charles Srstka via swift-evolution <swift-evolution at swift.org> wrote:
>> On Feb 6, 2016, at 6:26 PM, Charles Constant via swift-evolution <swift-evolution at swift.org <mailto: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] = [=]
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution