[swift-evolution] [Proposal] Set literal and Set type syntax
Sune Foldager
cyano at me.com
Tue Jan 19 12:15:47 CST 2016
> On 18 Jan 2016, at 23:12, Will Entriken via swift-evolution <swift-evolution at swift.org> wrote:
>
> Another interpretation is that a Set *is* indexed, and its value is nonexistent. Or, in other words:
>
> var x = [String: ()]
> var y = [String: ()]()
>
> Literals might be
>
> var z = ["bourbon": (), "scotch": (), "beer": ()]
>
> or more succinctly
>
> var a = ["bourbon": (), "scotch", "beer”]
Yes, but it still looks weird. I don’t see what’s so horrible about var a : Set = [1, 2, 3, …]. -1 from me unless a better syntax is worked out, at least.
-Sune
More information about the swift-evolution
mailing list