Dave Abrahams wrote: > > Erica Sadun wrote: > > > The whole discussion started because ArrayLiteralConvertible meant > > "can be initialized from Array literal", and not "can be converted to > > array literal", which is what nearly everyone this was presented to in > > an informal study thought it meant. > > Actually, it means “can be the type of an array literal.” An array > literal is an expression, not an object. Roughly speaking, the type > checker decides what type the array literal has by finding the > best-matching type that conform to the protocol, and the code generator > injects the necessary calls to the initializer.
ArrayLiteralExpressible BooleanLiteralExpressible CharacterLiteralExpressible (was ExtendedGraphemeClusterLiteralConvertible) DictionaryLiteralExpressible FloatingPointLiteralExpressible (was FloatLiteralConvertible) IntegerLiteralExpressible NilLiteralExpressible StringInterpolationExpressible (or InterpolativeStringLiteralExpressible)‡ StringLiteralExpressible UnicodeScalarLiteralExpressible ‡ <http://thread.gmane.org/gmane.comp.lang.swift.evolution/17229> -- Ben _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
