#if os(Linux)
import Glibc
#else
import Darwin.C
#endif
https://swift.org/package-manager/#example-usageSwift is Open Source
51–60 of 458 posts
Re: Swift is Open Source
#52How is developing on iOS these days? Swift seems like such nice a nice language.
After a couple of months of Swift-ing, I now started a project in C++ and while it's nice to be back home (in the C++ world), I immediately feel like I'm on my own - C++ doesn't make any attempt to protect me from myself (although it feels like I have more power to do what I want).
The Swift compiler, on the other hand, will obsessively stop me from fitting a square into a circle and will only allow me to do that if I declare loud and clear that "I know what I'm doing!".
Re: Swift is Open Source
#53Linux support is hinted at in examples: #if os(Linux) import Glibc #else import Darwin.C #endif https://swift.org/package-manager/#example-usage
Re: Swift is Open Source
#54Linux support is hinted at in examples: #if os(Linux) import Glibc #else import Darwin.C #endif https://swift.org/package-manager/#example-usage
Re: Swift is Open Source
#55Linux support is hinted at in examples: #if os(Linux) import Glibc #else import Darwin.C #endif https://swift.org/package-manager/#example-usage
Re: Swift is Open Source
#56Re: Swift is Open Source
#57[deleted]
Re: Swift is Open Source
#58Re: Swift is Open Source
#59They're releasing the source code to libdispatch? I thought that was one of Apple's trade secrets, and more applicable than just Swift apps since it's a C lib?
https://libdispatch.macosforge.org/post/libdispatch-is-open-...
Re: Swift is Open Source
#60Linux support is hinted at in examples: #if os(Linux) import Glibc #else import Darwin.C #endif https://swift.org/package-manager/#example-usage
I guess the fact that there are official Linux packages in the download section are a pretty good hint that there will be Linux support.