Live data from Hacker News

Ask HN: What is the future of Swift on the server-side?

news.ycombinator.com

21–30 of 60 posts

Re: Ask HN: What is the future of Swift on the server-side?

#22

> backend for my project > a performant, statically-typed, systems programming language. What is your project about? What are the latency requirements? How many concurrent users you expect to have? If these numbers are not high, why are you not using a general purpose language like go or Kotlin? I used vapor for a evaluation project a while ago and abandoned it quickly. While Swift is a nice language, it is still a 2…

> While Swift is a nice language, it is still a 2nd class citizen on non-Mac systems. What makes it a second class citizen?

Adding on to the other comments, swift on Linux also does not have some frameworks like Combine

Re: Ask HN: What is the future of Swift on the server-side?

#23

Amazon Prime, Mercedes and allegro have been using it. There is a conference happening soon, so you can get more inform https://www.serversideswift.info/

Very surprised that any serious company was actually using it for real application. Can you provide links to some post giving more details ?

Re: Ask HN: What is the future of Swift on the server-side?

#24
As a fullstack dev, focused on ios dev for the past 10 years, i'd say swift for anything other than ios/macos dev is pretty much experimental.

The community tries to expand swift's horizon with all its heart, but as long as apple is the main force behind the language there's going to be no real incentive for it to become a serious contender on other platforms.

I'd recommend go, if it's a serious project you plan to maintain for years.

Re: Ask HN: What is the future of Swift on the server-side?

#25
post #7

I have a production app live using Swift/Vapor. I created this app solely for the purpose of learning full-stack development using Swift, and so far it has been an amazing ride. The best thing about using Swift on the server if you're already an iOS developer is that a ton of models and DTOs are simply shared across your backend and your app(s). I have deployed my backend on a tiny DO droplet using Docker, and it jus…

C# with ASP.NET Core has been pretty great in my experience; it has both reasonable language syntax without that many footguns and reliable performance

Re: Ask HN: What is the future of Swift on the server-side?

#27

IMO the better alternatives would be Go, Kotlin or C#. Much better ecosystems where you won't have to keep reinventing wheels.

Of those languages, only Go could be argued to be “systems” and even then not if the GC is a deal breaker.

OP wants a systems language.

Re: Ask HN: What is the future of Swift on the server-side?

#28
post #27

IMO the better alternatives would be Go, Kotlin or C#. Much better ecosystems where you won't have to keep reinventing wheels.

Of those languages, only Go could be argued to be “systems” and even then not if the GC is a deal breaker. OP wants a systems language.

> OP wants a systems language.

OP is describing they want to write a backend, not a operating system. "Systems language" might have been a "kinda" specifier, rather than precise.

Go, Kotlin, C# or even Java works just fine for backends. If I were OP, I'd use whatever I know best, or is the most similar to what I know best. Unless I want it to be a learning experience, they I'd chose the language that is the least similar to the languages I know.

Re: Ask HN: What is the future of Swift on the server-side?

#29
Currently using Swift for a side project. It's "server side" in that I have a server implementation that runs on an iOS device and in Linux on a server. Using SwiftNIO for the server pieces, as it's from the Netty folks, and I really like their design.

I've been happy with it thus far, even though I should note that my usage is pretty low stakes / trivial. It has just enough of what I want of modern language conveniences that I'm not sad about using it. I certainly derive some happiness from having a zero impedance inclusion on the iOS and server side; conversely, were I to use Rust, my early reading seemed to indicate I' have to navigate a bit of FFI and library inclusion on the iOS side that I'd much prefer not to.

So, at hobbyist level, it's been fine. If I were to go purely on technical merits and language niceties I would have chosen Rust, as the depth of language features and standard library features is really really nice for me, but the fact that I can just have something that works in either of my desired platforms has made it okay to deal with a slightly less mature (IMO) ecosystem.

Also, as a note, I've done just a tiny bit of SwiftWASM with this same toolset, and it's not bad either. Pretty far behind Rust's WASM capabilities in my experience, but accomplishes what I need and is generally nice. Tokamak ( a WASM-friendly UI framework like SwiftUI ) has been nice in my initial usage as well. I'm definitely at a firm hobbyist level of using this stuff tho, no production anecdotes to give you unfortunately.

Re: Ask HN: What is the future of Swift on the server-side?

#30

Google's Go language is well suited for back-end code. However, it's a very opinionated and quirky language. If its style suits you it's a great choice. If, after looking at it for a bit, it doesn't sit well then nope.

What did you find to be quirky?
Post reply on HN