Afaik, every Unicode scalar can be its own character, so IMO it's not
bothersome that there are overloads that take Unicode scalar arguments.
However, since the stated purpose of the type is to be a set of characters,
isn't the problem you're presenting really an argument that the type should
be fleshed out to handle characters (grapheme clusters) containing more
than one Unicode scalar?


On Wed, Sep 28, 2016 at 18:43 Erica Sadun <er...@ericasadun.com> wrote:

> On Sep 28, 2016, at 3:58 PM, Xiaodi Wu <xiaodi...@gmail.com> wrote:
>
>
> Is this really correct? Character and UnicodeScalar are not synonyms. The
> Character type represents a character made up of one or more Unicode
> scalars (i.e. an extended grapheme cluster). Is a CharacterSet a set of
> Unicode-compliant characters that happens to be restricted to those
> characters each made up of only a single Unicode scalar, or is it meant to
> be a set of Unicode scalars? My read of the Foundation documentation is
> that it is the former.
>
>
> http://i.imgur.com/h6W5kYc.jpg
>
> http://i.imgur.com/q50PSld.jpg
>
> -- E
>
>
>
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to