Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Swift code will run on Google's Fuchsia OS (theverge.com)
5 points by aplummer on Nov 21, 2017 | hide | past | favorite | 2 comments


Oh, 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....)


Well ... 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: