6 ms·
As a Rubyist, I was about to jump on the Crystal train, but then server-side Swift started getting really good. Crystal is awesome, but I feel it’s not solving
by briandear 8y ago
As a Rubyist, I was about to jump on the Crystal train, but then server-side Swift started getting really good. Crystal is awesome, but I feel it’s not solving any problem particularly better than Swift. With Swift being compilable even on a Raspberry Pi and of course Linux and Mac, it seems like Crystal is now a solution in search of a problem. Definitely a great language, but probably destined to be relatively niche in production contexts simply because the community is so small and it’s loosely competing against the rapidly maturing Swift world.
- jrs95 8y agoIs server-side Swift really that good now? I’m in the market for a new statically typed language, and it was looking like Java still might be my best option...and I’m really not a huge fan of that.
- nicholasjon 8y agoWhat about Kotlin? (Or were you thinking of avoiding all JVM languages?) We're very happy using it to power our server-side services.
- buremba 8y agoGive Kotlin a shot. It has Swift-like syntax and feature-set, you can also call Java libraries from Kotlin since it's all in JVM.
- Scarbutt 8y agoBesides the JVM and its langs, others with big communities are golang and typescript.
- riku_iki 8y agoThere is also MS stack with C#.
- WoodenChair 8y agoI think whether it's "good" is still to be determined as it evolves. There are three "maturing" Web frameworks that are fairly popular within the Server-side Swift community: Kitura, Perfect, and most popularly Vapor. There are others too. Based on my cursory explorations, I would checkout Vapor first.
- smt88 8y agoJust curious, why not Kotlin, Scala, or Clojure over Java?
- riku_iki 8y ago> Java still might be my best option...and I’m really not a huge fan of that. also pure Java with latest goodies (type inference, functional libs) may not be that bad choice nowdays.
- mikkelam 8y agoI love swift, but without ABI[0], it's use cases are limited except doing anything but iOS development (which is barely ok) https://github.com/apple/swift/blob/master/docs/ABIStabilityManifesto.md https://github.com/apple/swift/blob/master/docs/ABIStability...
- kenneth 8y agoI stopped coding seriously right around the time Swift became a thing (after a decade of Obj-C, C, Ruby, Clojure, PHP, and other nightmarish things), and always thought Swift for compiled server binaries, running on linux machines would be amazing. I've followed the scene from afar, but never got the impression anything seriously caught on. What do things look like these days that make you think server-side Swift is viable?
- briandear 8y agoVapor is the main reason. Kitura is also used, but it seems, in my opinion, that it’s not as vibrant as it was, despite IBM backing. Vapor has a pretty active community — it feels like the early days of Rails. I have started using Vapor to write microservices where I would have used Rails-api in the past and the performance is astounding but you still get the ease of use typical of Rails. The Vapor ORM works pretty great so you get ActiveRecord style sugar but with pretty great performance. Perfect is another server-side framework that is popular, but Vapor won me over because I feel like it was a more approachable community. Basically Vapor feels like circa 2006 Rails in terms of momentum. And it’s crazy fast and the toolkit seems to be evolving quickly.
- stephen 8y agoI 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.