Sent from my iPad

> On Jan 19, 2017, at 8:13 PM, David Sweeris <daveswee...@mac.com> wrote:
> 
> 
> 
> Sent from my iPhone
> 
>> On Jan 19, 2017, at 20:56, Ben Cohen via swift-evolution 
>> <swift-evolution@swift.org> wrote:
>> 
>> Hi all,
>> 
>> Below is our take on a design manifesto for Strings in Swift 4 and beyond.
>> 
>> Probably best read in rendered markdown on GitHub:
>> https://github.com/apple/swift/blob/master/docs/StringManifesto.md
>> 
>> We’re eager to hear everyone’s thoughts.
>> 
>> Regards,
>> Ben and Dave
> 
> An enthusiastic +1
> 
> A couple more quick thoughts...
> 
> 1) Is it just me, or is explicitly putting some of the "higher level" 
> functionality in Foundation instead of stdlib kinda reminiscent of MVC? I 
> guess UIKit/Cocoa would be the "View" part.

Might just be you ;-)

> 2) I like the idea of making String generic over its encoding... Would we 
> need to nail down the hypothetical type promotion system for that to work, or 
> can it all be handled internally?

If you're implicitly asking what the type of s1 + s2 is when they have 
different encodings,
I don't think we need a type promotion system to handle that.  Unlike with 
fixed-width integers, there is a family of maximally-expressive encodings that 
can be used for the result of any operation whose result would otherwise be in 
doubt without any serious loss of performance.  I would probably just go with 
the currency type, "String" for these cases.

Cheers,
--
Dave
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to