> On Nov 8, 2016, at 1:07 PM, Anton Zhilin via swift-evolution > <[email protected]> wrote: > > 2016-11-08 23:53 GMT+03:00 Pyry Jahkola <[email protected] > <mailto:[email protected]>>: > > > > Then why not just: > > public protocol ExpressibleByIntLiteral { > static var `nil`: Self > } > > …such that Foo.nil creates your nil value of type Foo? > > > This proposal is not about creating an alternate syntax for nil as > Optional<Foo>. It’s about granting nil literal its own type: > > let a = nil > print(type(of: a)) //=> Nil
Is this desirable? John.
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
