Swift3 Linux vc Mac DispatchQueue Swift3 Linux vc Mac DispatchQueue linux linux

Swift3 Linux vc Mac DispatchQueue


As of Swift 3.0 release version GCD is available on Linux with simple import Dispatch, which is slightly confusing as it's not needed on iOS/macOS, where Dispatch module is imported by default.


Thanks to Brad Larson for finding the Foundation and Dispatch overlays in the source. According to swift.org:

SDK Overlays: Specific to Apple platforms, the SDK overlays (implemented in stdlib/public/SDK) provide Swift-specific additions and modifications to existing Objective-C frameworks to improve their mapping into Swift. In particular, the Foundation overlay provides additional support for interoperability with Objective-C code.

tl;dr anything in these folders are Apple platforms only. Still not sure why they restricted the Dispatch overlays to Apple Platforms since libdispatch is also open source and targeting linux, but this answers my initial question.

Edit: was able to confirm via swift mailing lists that the dispatch overlays do have some reliance on objective-c runtime. There is work to get them implemented for non-Darwin platforms but no guarantees on timing.


Check out the Swift 3 Evolution Github page. They list all the proposed changes to the language, and separate them by those that have been implemented and those that have not. Proposal SE-0088: Modernize libdispatch for Swift 3 naming is on the "yet to be implemented list" as are many other changes.

As far as Data and Date are concerned, I cannot say, since I believe that is part of the upcoming Core Libraries, and I have not yet been able to look at those in great detail yet. Perhaps you might check the Swift Core-Libs Github page as well, though the status page references work done on NSData and NSDate, no mention of the newer data types.