Oh, where should I begin… there's more, but let me just mention two things:
- Foundation
For the time being, almost everyone who is writing cross-platform Swift programs will have to use Foundation on Linux.
The Swift Standard Library is lacking way too many things to make up for that. Besides the many missing APIs
(FileDescriptors, [SR-15545] Linux: DispatchTime's advanced() is not implemented · Issue #601 · apple/swift-corelibs-libdispatch · GitHub, ), it's the
differences in semantics which are making a cross-platform developer's life really hard. Random tidbits from a crowd:
-
Actors vs. NSObject conformance brokenness on Linux ([SR-15282] Using an actor with NSObject conformance on Linux · Issue #3200 · apple/swift-corelibs-foundation · GitHub)
-
NSNotificationCenter regressions ([SR-14815] Regression (Linux): NotificationCenter silently failing since 5.4.1 · Issue #3218 · apple/swift-corelibs-foundation · GitHub)
-
Same delegates being optional on macOS and not on Linux.
-
IFF_UP is an Int32 on macOS, but an Int on Linux.
-
To use Posix without Foundation, you must jump through namespacing hoops which everyone is reinventing, see e.g. GitHub - NozeIO/xsys: Basic cross Linux/Darwin/Win(?) Posix aliases for Swift, Socket.swift/OS.swift at master · BiAtoms/Socket.swift · GitHub, GitHub - bscothern/SwiftyPOSIX: A Swift wrapper around the C POSIX Standard., and many more.
-
The only higher level cross-platform stream-based communication infrastructure (Stream) being deprecated on Apple platforms with every one always asking "Why don't you use Network?" to which my answer is "Because I care about more than just Apple!".
- Packaging
If it wasn't for @futurejones activities, we would install our favorite language (runtime) like in the stonehenge days…with tarballs. Combine this with the lack of static linking and proper cross-compiling for other platforms ([SR-15701] Linux: Compile error when cross-compiling with --static-swift-stdlib · Issue #57980 · apple/swift · GitHub) and then compare this miserable situation with other programming languages tools.
Swift on Linux may be quite fine, but Swift for APPLE and !APPLE is pretty painful.
That's what I mean with Linux (or better !APPLE) interoperability being a diverse field of challenges and opportunities where a dedicated working group could make a significant difference.