[swift-evolution] Mutability for Foundation types in Swift

Tony Parker anthony.parker at apple.com
Mon Apr 25 12:55:07 CDT 2016


Hi Ben,

> On Apr 24, 2016, at 3:51 PM, Ben Rimmington via swift-evolution <swift-evolution at swift.org> wrote:
> 
> <https://github.com/apple/swift-evolution/blob/master/proposals/
> 0069-swift-mutability-for-foundation.md>
> 
> The proposal looks great.
> 
> ## Introduction
> 
> Broken link:
> 
> -- <https://developer.apple.com/videos/play/wwdc2015-414/>
> ++ <https://developer.apple.com/videos/play/wwdc2015/414/>
> 

Thanks; I’ll fix that.

> ### New Value Types
> 
> CharacterSet:
> 
> * Rename to UnicodeScalarSet?

We made a decision to leave the names of the types the same between Swift and Foundation. It’s a tradeoff for sure, but it seems better than other alternatives. Consistent documentation and hindering a common understanding of purpose for the type would be the biggest challenge if we change the names.

> * Update APIs to follow SE-0059 (SetAlgebra) proposal?

We’ll make sure they match in the implementation.

> * Add `enumerateRanges` method, similar to NSIndexSet?
> 

Not a bad idea. We’ll consider new API separately from the main thrust of the proposal (its transition to a value type in the first place).

Thanks!
- Tony


> -- Ben
> 
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list