[swift-evolution] [Proposal Draft] Literal Syntax Protocols

Erica Sadun erica at ericasadun.com
Wed Jun 29 09:15:07 CDT 2016


I rather like this one.  It produces: `Syntax.Literal.IntegerProtocol`, which is honestly
the best I've seen so far *and* it might get past the Dave test.

Thank you for bringing this into the conversation!

-- E

> On Jun 29, 2016, at 12:31 AM, Adrian Zubarev via swift-evolution <swift-evolution at swift.org> wrote:
> 
> How about:
> 
> public enum Syntax {
>      
>     public enum Literal {
> 
>         public typealias NilProtocol = ...
>         public typealias BooleanProtocol = ...
>         public typealias IntegerProtocol = ...
>         public typealias FloatProtocol = ...
>         public typealias UnicodeScalarProtocol = ...
>         public typealias ExtendedGraphemeClusterProtocol = ...
>         public typealias StringProtocol = ...
>         public typealias StringInterpolationProtocol = ...
>         public typealias ArrayProtocol = ...
>         public typealias DictionaryProtocol = ...
>     }
> }
> 
> extension Array : Syntax.Literal.ArrayProtocol { ... }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160629/62459807/attachment.html>


More information about the swift-evolution mailing list