on Wed Sep 28 2016, Erica Sadun <[email protected]> wrote:

> Chris: "Also, it is worth saying that any source breaking change still has to 
> have an 
> ultra-compelling reason to be worth considering.  Despite having a framework 
> to 
> support some source breaking changes, we still want to minimize them where 
> ever possible."
>
> Since it seems to be open season on introducing a few, highly focused
> breaking changes, let me throw this one out there.
>
> Pitch: Renaming CharacterSet to UnicodeScalarSet

Hi Erica,

This is out-of-scope for this list, because CharacterSet is part of
corelibs-foundation.  I suggest posting on
https://lists.swift.org/mailman/listinfo/swift-corelibs-dev, where the
Foundation people hang.

> In Swift, String is defined as "a Unicode string value." and a "CharacterSet" 
> represents a set of Unicode-compliant characters.
>
> A CharacterSet's initializers are:
> init()
> init<S>(S)
> init(arrayLiteral: UnicodeScalar...)
> init(bitmapRepresentation: Data)
> init(charactersIn: ClosedRange<UnicodeScalar>)
> init(charactersIn: String)
> init(charactersIn: Range<UnicodeScalar>)
> init?(contentsOfFile: String)
>
> Why not rename `CharacterSet` to `UnicodeScalarSe`t, and update the 
> initializers
> to reflect they're being initialized from the unicode scalars in strings and 
> ranges?
> I think the few places where the word `character` is left mentioned (in 
> convenience
> properties) can be better named from `punctuationCharacters` to 
> `punctuation`, 
> `controlCharacters` to `controlAndFormat`, etc.
>
> -- E
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
>

-- 
-Dave

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to