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

Xiaodi Wu xiaodi.wu at gmail.com
Mon Jun 27 08:37:06 CDT 2016

DictionaryLiteral seems fine to me; it's as much a dictionary as
ArrayLiteral is an array, right?

What's wrong with ExtendedGraphemeCluster? It precisely self-documents what
must exist between the double quotes to qualify as such a literal. Plus, we
don't have e.g. a single-quoted character type; the name CharacterLiteral
is a misnomer for what's effectively a string literal constrained by length.

Likewise, it's not a StringInterpolationLiteral but StringInterpolation;
there's no syntax for demarcating it, so it's a string literal constrained
by what's between the double quotes.
On Mon, Jun 27, 2016 at 08:40 Ben Rimmington via swift-evolution <
swift-evolution at swift.org> wrote:

> <https://github.com/apple/swift-evolution/pull/381>
> Find:    "ExtendedGraphemeClusterConvertible"
> Replace: "ExtendedGraphemeClusterLiteralConvertible"
> Find:    "StringInterpolationLiteralConvertible"
> Replace: "StringInterpolationConvertible"
> Find:    "StringLiteralLiteral" (x5)
> Replace: "StringLiteral"
> Find:    "ArrayrLiteral"
> Replace: "ArrayLiteral"
> Should the `DictionaryLiteral` structure be renamed?
> <https://developer.apple.com/reference/swift/dictionaryliteral>
> It isn't a dictionary or a literal, it's an ordered collection.
> Can we also change `ExtendedGraphemeCluster` to `Character`?
> This would affect the argument label, global type alias, etc.
> -- Ben
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160627/178ab83d/attachment.html>

More information about the swift-evolution mailing list