[swift-evolution] Colon vs. equals
Paul Ossenbruggen
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] = [=]
>
> Charles
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160206/b188996d/attachment.html>
More information about the swift-evolution
mailing list