5 ms·
I have always considered this a weird effort. Foundation is not Swifty (delegate protocols with optional methods, etc.). Why do we need a Swift implementation o
by chris_7 10y ago
I have always considered this a weird effort. Foundation is not Swifty (delegate protocols with optional methods, etc.). Why do we need a Swift implementation of NSMutableArray or NSNumber? Just use Array or Int/Double!
Of course, a core Swift library for URL handling is important! And on macOS/iOS it can be implemented on top of Foundation. But I don't think that library should come with a bunch of geometry, collections, or number formatting types as well. µframeworks are Swifty. The SPM documentation says something like "in general more modules is better than fewer modules", so it's weird to have a giant framework as an official core library.
- paxcoder 10y agoNo networking OR file system access in the free implementation. You'd be hard pressed to find a Swift project that doesn't depend on Apple's proprietary Foundation because Swift needs it to talk to the world! I don't understand what IBM is thinking.
- bsaul 10y agoWhy are you referring to IBM ?
- adamnemecek 10y agoThey are the face of Swift on Linux.
- c0ffe 10y agoWhat does Kitura use for threading and IO in Linux? Is there any library for cross platform asynchronus IO?
- paxcoder 10y agoGood question. For networking, Kitura uses Kitura-net, which uses BlueSocket, which in turn uses C library's sockets[1]. On GNU/Linux, this is the GNU C Library, for which a package (Glibc) is provided by the Swift port[2]. For asynchrony they seem to be using libdispatch despite it being "early in the development"[3], but I've also noticed they're wrapping epoll and curl (see 1.B again), so it's hard to gauge the real extent of the hack. [1]: https://github.com/IBM-Swift/Kitura/blob/master/Package.swift#L22 https://github.com/IBM-Swift/Kitura/blob/master/Package.swif... https://github.com/IBM-Swift/Kitura-net/blob/master/Package.swift#L27 https://github.com/IBM-Swift/Kitura-net/blob/master/Package.... https://github.com/IBM-Swift/BlueSocket/blob/master/Sources/Socket.swift#L1226 https://github.com/IBM-Swift/BlueSocket/blob/master/Sources/... [2] https://swift.org/blog/swift-linux-port/ https://swift.org/blog/swift-linux-port/ [3] https://github.com/apple/swift-corelibs-libdispatch https://github.com/apple/swift-corelibs-libdispatch