Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not if you're using anything other than macOS or iOS derived systems.


That would change very quickly if the Rust ecosystem dies.


That is sorta how I feel. Regardless how people feel about Swift. Having dabbled in Swift over the past couple of weeks, getting paid to sling C# and doing Rust in my open source work, Swift feels like a perfect mix between C# and Rust. You want C#, but some of the niceties of Rust. Or you want Rust with some of the niceties of objects on C#.


yeah agreed. It just feels like it’s going to be hard for it to escape people’s hesitation due to the level of Apple influence/control. I wonder why golang didn’t seem to experience the same issue


Speaking only for myself, I’ve tried to learn Swift but you really need to be developing an app on an Apple OS to be able to get practice on the breadth of the language.

Go, by comparison, can be learned in a couple of days, and it’s trivial to build a useful CLI with it.

So from my perspective, the barriers to entry for Swift are much higher, but it’s mostly due to the domain rather than the sponsor.


There are some things in Swift that definitely are not as easy going as on Golang. Swift I think, at least offers a good starting point (the bits are there), but it is so hard to find good Swift documentation or blog posts that are not centered around the idea of making an iOS app. Even trying to find decent blog posts where someone shows off or talks about writing command line macos apps is virtually non-existent. Swift for sure, has the building blocks to do it, but you really gotta dig to find that stuff.

As an example. I have been dabbling with controlling my Roku from a watchOS app. Roku devices respond to a call on 239.255.255.250:1900 with a SSDP packet over UDP. Try finding good and recent tutorial on doing UDP programming and it is non-existent.


Yeah, I guess that’s my point. Most people use Swift for building apps, but anything else like servers or CLIs and all the tutorials go nowhere, because… most people use Swift for apps.

So yeah I had a similar experience. And Go is much more aligned with my use cases so hints are everywhere.

To be clear I still want to learn Swift. But the time investment is much, much greater.


that's fair, I was thinking of it more as an "easier alternative to Rust" than "is it any harder to learn than Go", which puts things in a very different frame :)


Swift is not a C or C++ replacement, so there is no indication that would happen.


Not for all cases, sure. It would be challenging to write an OS kernel or low level device firmware in Swift, but for a lot of other use cases it is absolutely a viable alternative to C and C++.


Apple is doing exactly that. They’ve already shipped stuff written that way. I think the Secure Enclave code is now Swift.

I’m pretty sure they have extra stuff on top at the moment to help them write ultra-strong/safe code that the released language doesn’t support directly yet.

But they are moving in that direction. Just because most people use Swift as a language where they don’t have to worry about memory allocation and with the large standard library doesn’t mean that’s all it can do.


It surely is from Apple's point of view, it is even expliclity mentioned on its documentation.

Apple doesn't care about what outsiders think, they own the platform.


What? Huh?

You forgot Windows, Linux, WASM in browser, WASI envs


Swift is next to useless on any platform other than Apple's.


Swift on the server is really quite well supported now. Frameworks like Vapor work fully, there's a thriving ecosystem. And above all, Apple clearly wants this to work. Apple aren't deploying macOS servers for their backend services.


[flagged]


Swift is most comparable to Kotlin in the current crop of languages and the Kotlin team is doing their best to get multiplatform, backend, KotlinJS, and native everywhere. Kotlin dominates Android obviously, but is growing quickly on the backend. The other implementations are still early but they continue to be improved.

I don't see Swift anywhere outside of Apple and don't see why anyone would reach for it instead of Kotlin.

It also doesn't help that JetBrains has an IDE that makes development in the language so nice people are willing to pay for it and Xcode easily is the worst user experience of any current product developed by Apple.


I see people claim this frequently that Kotlin is used a lot on the backend, but there’s very little evidence that this is true.

I absolutely will concede that Swift is in practice an Apple only language, but I feel Kotlin is essentially an Android only language in practice as well.


Nope, Kotlin is plenty popular on backend, so much so it's mundane to see it in popular frameworks like Spring and Play. It helps that it's designed to coexist with Java.


It is almost meaningless, about 10% if at all.


We had a bunch of Kotlin on the server at Airbnb in 2018.


DoorDash moved their python backend to kotlin afaik


About a year ago, Swift on linux was a bit of a minefield. Only parts of Foundation were implemented, and you couldn't use the Linux toolkit on a Mac to cross-compile or even just link against the Linux version of Foundation. The recentish move to reimplement Foundation in Swift natively is a big win, and I haven't tracked how close that project is.


> and I haven't tracked how close that project is.

It's a while away yet. Exciting prospect though!


It's my experience as someone who wants to use Swift on something other than macOS/iOS.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: