> On Nov 8, 2017, at 2:24 AM, Geordie Jay via swift-users
> <swift-users@swift.org> wrote:
>
> Would you be able to clarify where the line is between “tricky” and “not
> tricky” and if possible the reasoning behind making this distinction? Because
> as an outsider this seems to me like an unfortunate remnant of ObjC rather
> than an obvious and forward-thinking API decision.
The “only available after importing Foundation” thing has been around since 1.0
— it’s an artifact of the bridging of String and NSString*. After importing
Foundation, the methods of NSString are implicitly available as an extension of
String. I would think that by now the Swift standard library would have added
those methods, but I guess not all of them…
—Jens
* And IIRC it also manifests with Array, Dictionary, and other bridged classes.
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users