3 ms·
I personally find general-purpose Swift surprising because I'd assumed that they'd have to make various language/runtime compromises, solely for backwards compa
by stephen 8y ago
I personally find general-purpose Swift surprising because I'd assumed that they'd have to make various language/runtime compromises, solely for backwards compatibility with Objective C, that it'd always be relegated as a niche, iOS-only language.
Admittedly, this is a somewhat naive assumption, but it also based on my experience of Scala/etc. languages building on top of the JVM.
Any input/data on that opinion?
- WoodenChair 8y agoSwift on Linux is not at all tied to Objective-C. In fact Swift on Linux does not even include the Objective-C runtime. So, you basically get an ahead-of-time compiled language with the same Foundation library as Swift on Mac but without any Objective-C dependency. The Objective-C interop features of Swift are there for interaction with Apple's frameworks on their platforms.
- mikece 8y agoWhat tooling exists for writing/compiling Swift on Linux?
- wilsonnb2 8y agoLast I checked, not much. Apple only distributes binaries for a few versions of Ubuntu, so unless you're running Ubuntu 14.04, 16.04, or 16.10 you have to compile it yourself. I tried to get it working on Fedora a while back but eventually gave up. The only swift IDE's I know of are the JetBrains one (AppCode, I think?) and xcode. Neither of them runs on Linux. There are a few plugins for existing IDE's but nothing that's great yet. IBM is surprisingly into swift, so I wouldn't be surprised if Eclipse eventually gets first class support for it but it hasn't happened yet.
- briandear 8y agoBackwards compatibility with Objective C hasn’t been a huge priority, though you can definitely wrap ObC with Swift pretty easily. I definitely recommend digging into server Swift to form your own opinion. Vapor is a good, gentle starting point because the tooling to get up and running is pretty nice; it’s not a huge investment to play.