If we start from this thought…

> Adrian Zubarev wrote:
> Shouldn’t it be just like this:
> public protocol ExpressibleByNilLiteral {
> 
>   init(nilLiteral: Nil)
> }

Then why not just:

    public protocol ExpressibleByIntLiteral {
      static var `nil`: Self
    }

…such that Foo.nil creates your nil value of type Foo?

— Pyry

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to