> On Jun 28, 2016, at 2:57 PM, Dave Abrahams via swift-evolution 
> <[email protected]> wrote:
> No, it's exactly the opposite, as I keep saying.  Conformance to this
> protocol does *not* mean you can initialize the type with a literal.
> Proof:
> 
>  func f<T: IntegerLiteralConvertible>() -> T {
>    return T(integerLiteral: 43) // Error
>    return T(43)                 // Also an Error
>  }
> 
> It means an instance of the type can be *written* as a literal:
> 
>  func f<T: IntegerLiteralConvertible>() -> T {
>    return 43   // OK
>  }
> 
> Everybody's confused about the meaning of the protocol, and doesn't like
> the proposed names because they imply exactly the actual meaning of the
> protocol, which they misunderstand.


Or we're clueless AND it's a bad name.

func f<T: IntegerPromotion>() -> T {
    return 42 // the answer to everything
}

-- E

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

Reply via email to