[swift-evolution] [Review] SE-0005 Better Translation of Objective-C APIs Into Swift
drew at sealedabstract.com
Mon Feb 1 17:30:54 CST 2016
> On Feb 1, 2016, at 4:08 PM, Tony Parker <anthony.parker at apple.com> wrote:
> Dropping the NS is one part of how we intend to make Foundation a great part of Swift.
This kind of response highlights I think an important disconnect between Foundation maintainers and some of us in the peanut gallery, along "cathedral/bazaar" lines.
In my mind, it is very far from certain that Foundation will be the "other standard" Swift library. Like, I realize that is the goal, I realize that's what it says in the README, I realize I am contributing PRs to make it happen in the other window right now, but not all plans work out, right?
Foundation exists in an ecosystem, and it will face challenges from other approaches. Foundation has taken its position. Foundation has elected to be a monolithic library. It has elected, in the Swift 3 timeframe to stay close to Darwin API surface. It has elected not to initially target Darwin as a runtime environment.
But other tradeoffs were possible, and will be explored, and are being explored, by others. I am constantly evaluating my Foundation dependency to see if keeping it makes sense. I know very bright people who have already decided it does not. I am not there quite yet, but I sense the hour growing later.
But the decision to ship a reference-type called `URL` in Swift 3 would probably put me there. The decision to draw a distinction between `NSString` et al and the other Foundation types would probably put me there. These are not decisions that are compatible with the Swift code I want to write, now or in the future.
I understand that you believe this change is part of "making Swift great." But there is room for debate about what "great" is, because in an open ecosystem, each project will make its choice whether to link Foundation or not. Right now, Linux-target projects link with Foundation because there are no alternatives, but that will change presently.
For all the reasons in my review (and I separately concur with Nate), I believe that dropping the NS prefix on the present classes as they are implemented now (e.g. NSURL, etc.) is absolutely the wrong thing to do. If we do it, it will confirm for me that my vision for a standard library and Foundation's are very different, and I need to start moving out of mom's house.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution