Swift 3.0 and Foundation

I will avoid the obvious foundation garment jokes, and point you to this repo: Swift CoreLibs Foundation.

Quoting Apple:

This project provides an implementation of the Foundation API for platforms where there is no Objective-C runtime. On OS X, iOS, and other Apple platforms, apps should use the Foundation that comes with the operating system. Our goal is to abstract away the exact underlying platform as much as possible…

Our primary goal is to achieve implementation parity with Foundation on Apple platforms. This will help to enable the overall Swift 3 goal of portability.

As mentioned in the accepted updates post, Foundation will use the new API guidelines that involve dropping NS prefixes, simplifying text, and eschewing overall verbosity.

Implementation status page is here. There’s still a lot of work to be done. The goal is to provide a small set of basic utility classes that can be used consistently across projects with a high degree of OS independence and portability.

The devs are taking care to distinguish between core language functionality (like Swift arrays and dictionaries), which appear in the Standard Library, and features (like regexes), which will be part of Foundation. Versions of NSArray/NSDictionary/NSSet/NSString will be part of Foundation, and will be distinct from those in the standard library.

One Comment