News for hackers. Stuff that matters.
Re:What's new in Swift 3.1 by paxcoder on Thursday January 26, 2017 @12:53PM (#13493514)
They should finish the free Foundation implementation[1] already which is the true standard library. Swift is not very useful without it, and they're talking about 4.0. It seems like Apple's giving their minimum to the community

https://github.com/apple/swift-corelibs-foundation/blob/mast...

Re:What's new in Swift 3.1 by chris_7 on Thursday January 26, 2017 @12:56PM (#13493548)
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.

Re:What's new in Swift 3.1 by paxcoder on Thursday January 26, 2017 @01:26PM (#13493834)
No 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.

Re:What's new in Swift 3.1 by bsaul on Thursday January 26, 2017 @05:25PM (#13495845)
Why are you referring to IBM ?
Re:What's new in Swift 3.1 by adamnemecek on Thursday January 26, 2017 @06:12PM (#13496257)
They are the face of Swift on Linux.
Re:What's new in Swift 3.1 by c0ffe on Thursday January 26, 2017 @06:20PM (#13496322)
What does Kitura use for threading and IO in Linux?

Is there any library for cross platform asynchronus IO?

Re:What's new in Swift 3.1 by paxcoder on Friday January 27, 2017 @02:27PM (#13501931)
Good 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.swif...

https://github.com/IBM-Swift/Kitura-net/blob/master/Package....

https://github.com/IBM-Swift/BlueSocket/blob/master/Sources/...

[2] https://swift.org/blog/swift-linux-port/

[3] https://github.com/apple/swift-corelibs-libdispatch

Re:What's new in Swift 3.1 by lostlogin on Thursday January 26, 2017 @01:07PM (#13493666)
The most recent episode of the podcast ATP has Chris Lattner discussing why trade offs such as this where made and how they prioritised. It's worth a listen. He really is/was a great ambassador for the language.
Re:What's new in Swift 3.1 by glhaynes on Thursday January 26, 2017 @04:27PM (#13495389)
Re:What's new in Swift 3.1 by bsaul on Thursday January 26, 2017 @05:23PM (#13495828)
I'd say it's far better strategically to make sure swift on iOS is the official mainstream way of developping an app ( which isn't the case yet) before you start to advocate using it on a totally new territory.

How much credibility would you have if you were to say to backend developpers " swift is such a great language, you'll love coding with it on the server side", and they hear that iOS still can't include the stdlib because the language is still not stable enough ? I've tried, and the answer is none.

Re:What's new in Swift 3.1 by valuearb on Friday January 27, 2017 @01:29PM (#13501523)
It's been foolish to develop iOS apps in anything but Swift since at least 2.0. Far more productive than Objective C.
Re:What's new in Swift 3.1 by ubertaco on Thursday January 26, 2017 @03:59PM (#13495210)
Apple putting minimal effort into developer tools? Surely not! /s