[swift-evolution] Pitch: Member lookup on String should not find members of NSString

Rod Brown rodney.brown6 at icloud.com
Wed Nov 8 17:38:54 CST 2017


> On 30 Oct 2017, at 6:16 am, Ted Kremenek via swift-evolution <swift-evolution at swift.org> wrote:
> 
> A complementary tactic would be that migration tool support to Swift 5 would insert the needed casts to NSString.  That way even if the magic lookup is gone in Swift 5 the code could be automatically migrated and preserve the same semantics.  If this came to a formal proposal I’d really like to see something like that considered.

Agreed.

I think that a lot of the NSString APIs would be nice to bring over native to Swift, and for those that are not yet implemented (or won’t be for various reasons) this would be a reasonable solution.

> 
>> On Oct 24, 2017, at 3:56 PM, Slava Pestov via swift-evolution <swift-evolution at swift.org> wrote:
>> 
>> I think to maintain source compatibility, the old behavior would be preserved until/if we remove -swift-version 4 mode. By deprecating it though, we won’t have to devote as much time to maintaining it going forward.
>> 
>> Slava


More information about the swift-evolution mailing list