3 ms·
Swift code will run on Google's Fuchsia OS
- wahern 9y agoOh, the horror! import SwiftPrivateLibcExtras #if os(OSX) || os(iOS) import Darwin -#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku) +#elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Fuchsia) || os(Haiku) import Glibc #endif (NOTE: Not the macros, but the apparent decision of early Swift developers to divide the world into two camps: OS X and Linux. Moreover, glibc is conflated with Linux. Worse, glibc is the de facto portability layer. I want to cry....)
- waddlesplash 9y agoWell ... Haiku isn't exactly glibc. Our math and IO portions are indeed glibc at least in large part (although a very old version...) but there is also a large chunk (locale, wchar_t, etc.) which we have our own version of.