4 ms·
Foundation is not the standard library of Swift. Swift has its own standard library that is bundled with the language on all platforms that are supported. And
by andrewjl 5y ago
Foundation is not the standard library of Swift. Swift has its own standard library that is bundled with the language on all platforms that are supported.
And Foundation itself isn't written in Swift, a good portion is written in C.
> A significant portion of the implementation of Foundation on Apple platforms is provided by another framework called CoreFoundation (a.k.a. CF). CF is written primarily in C and is very portable. Therefore we have chosen to use it for the internal implementation of Swift Foundation where possible. As CF is present on all platforms, we can use it to provide a common implementation everywhere.
https://github.com/apple/swift-corelibs-foundation/blob/main/Docs/Design.md#portability https://github.com/apple/swift-corelibs-foundation/blob/main...