Hacker News new | ask | show | jobs
by SimDeBeau 1416 days ago
Would you speak more about swift for things other than Mac apps? Last I heard swift was limited to Ubuntu on Linux, and Windows was experimental. Which is too bad because it seems like a really nice language, and I like the ARC garbage collection. But I’m hoping the cross platform story has improved since I last heard.
1 comments

According to this page [1] it's Ubuntu, CentOS and Amazon Linux at the moment, and Fedora is underway. I don't know much about Windows because am not considering Windows as a backend OS and I can imagine it would be problematic to support. Swift grew in the UNIX environment and it usually requires some serious effort to port UNIX stuff to Windows. And then I don't even think it will ever be as reliable.

On the Linux front, there's Apple's SwiftNIO which is a generic lower-level framework that itself is not an out-of-the-box web or API framework. You need another extra layer above it, which is for example this community-driven project called Vapor [2]

You can, in principle, build a e.g. JSON API based on barebones SwiftNIO and you will save a lot of 3rd party dependencies in this case, but this path is a bit masochistic, you really need to know what you are doing in this case. Vapor is much easier to jumpstart any kind of server project with.

[1] https://www.swift.org/blog/additional-linux-distros/

[2] https://vapor.codes