Thanks for the feedback Adrian!
> On Jun 24, 2016, at 10:01 AM, Adrian Zubarev via swift-evolution
> <[email protected]> wrote:
>
> I don’t like an underscore on public protocols. If we’re not forced to use
> the proposed syntax at all it looks strange when you use a type with an
> underscore (which to me represents something for private or internal usage).
>
>
The underscore is used in the same way it is used elsewhere in the standard
library. The protocols must be public because they need to be visible to user
code in order for the design to work correctly. However, they are considered
implementation details that users really shouldn’t know about. This pattern is
well established in the standard library.
> In Swift we only can use literals for a single direction literal -> type, so
> why don’t we just rename the protocols to look like:
>
>
This is a reasonable suggestion. I’ll add it to the alternatives section.
> public protocol NilLiteralProtocol { ... }
> public protocol BooleanLiteralProtocol { ... }
> public protocol FloatLiteralProtocol { ... }
> public protocol IntegerLiteralProtocol { ... }
> public protocol UnicodeScalarLiteralProtocol { ... }
> public protocol ExtendedGraphemeClusterProtocol { ... }
> public protocol StringLiteralLiteralProtocol { ... }
> public protocol StringInterpolationLiteralProtocol { ... }
> public protocol ArrayLiteralProtocol { ... }
> public protocol DictionaryLiteralProtocol { ... }
> Here Protocol corresponds to the user that we’re about to access a specific
> literal with our type which implements the protocol. (Just like
> ErrorProtocol.)
> - extension Array : ArrayLiteralConvertible
> + extension Array : ArrayLiteralProtocol
>
>
>
> --
> Adrian Zubarev
> Sent with Airmail
>
> Am 24. Juni 2016 um 16:21:21, Vladimir.S via swift-evolution
> ([email protected] <mailto:[email protected]>) schrieb:
>
>> es are
>
>
> _______________________________________________
> swift-evolution mailing list
> [email protected] <mailto:[email protected]>
> https://lists.swift.org/mailman/listinfo/swift-evolution
> <https://lists.swift.org/mailman/listinfo/swift-evolution>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution