top | item 46841873

(no title)

mogoh | 29 days ago

> There is a perception that Swift is only a good language for Apple platforms. While this was once true, this is no longer the case and Swift is becoming increasingly a good cross-platform language.

How good is the developer experience on a non-Apple platform really? Linux is my primary platform and my perception is, that allmost all of the swift eco system is for Apple. Libraries, tools, documentation, IDEs, tutorials, etc. all assume, that you use an Apple.

Can someone tell me who does not use an Apple-device and uses swift?

discuss

order

willhbr|29 days ago

My experience is that it is very frustrating. Apple's documentation makes no mention of what works on Linux and its limitations, so you just have to guess or work it out with trial and error.

I tried to write a websocket client: https://willhbr.net/2023/08/23/the-five-stages-of-swift-on-l... Then tried again 2 years later: https://willhbr.net/2025/10/13/the-6-2nd-stage-of-swift-on-l...

g947o|29 days ago

Sounds like a language not to waste my time on.

I should spend my time writing actual code and ship stuff, not debugging or finding holes in someone else's product.

WD-42|29 days ago

It’s not. The Apple devs will tell you it’s a great time on Linux, just like the MS people will tell you the same for C#.

Rust wasn’t designed for any specific platform and you can tell. The ecosystem on Linux especially is fantastic.

sealeck|29 days ago

> Rust wasn’t designed for any specific platform

I suspect that Mozilla being the primary developer and sponsor for many years actually meant that compatibility with all major platforms was prioritised; Mozilla obviously care about stuff working on Windows, and run lots of builds on Windows + I imagine a number of Firefox developers (if not drive) at least own a Windows machine for testing Windows-specific stuff!

I call out Windows because I think generally software people go for Mac > Linux > Windows (although Mac > Linux may be slowly changing due to liquid glass).

myko|29 days ago

I ship a lot of .NET on Linux these days, works great

jiggawatts|29 days ago

Arguably the dotnet sdk now works better on Linux than Windows. For example, Windows Containers are "supported" only the marketing checkbox sense.

rcarmo|29 days ago

I tried doing compiling a few of my Mac CLI tools to Linux. These days, it's faster to run them through an LLM and get quite excellent Go at the other end, and _that_ is much easier to cross-compile.

I have been looking at the new Android support (don't have the link handy) and it's tempting, but I know Kotlin and always developed for Android with a bare Makefile and the JDK, so I don't need any fancy tooling...

afavour|29 days ago

Yes, in my experience the Apple bias exists in all the articles and how-tos you read in a way that can trip you up.

It’s been years now but I wanted to create a Set with weak memory in its keys. Everything I read said “oh just use NSHashTable” and I dutifully did (it’s in Foundation) and then when I tried to cross compile it didn’t exist outside of Apple platforms. It’s not as if the import made it clear I wouldn’t be able to use it, but I couldn’t.

frizlab|29 days ago

Swift has swiftly to manage the Swift compilers to use (equivalent of rustup) and LSP works pretty well. Most of the (open-source) libs that Apple does are cross-platform. I personally take care to make sure my personal libs work on all platforms as well, including Windows(!) (anecdotal, I know…).

All in all it’s not perfect yet, but it’s getting better, with intent to continue in that direction.

sparky4pro|28 days ago

This! Also, for new APIs Apple reduces (or does not provide) Objective-C documentation.

I really tried to love Swift, but in the end I ended up with 1 project using Swift/SwiftUI, and all the other apps I started to write, I rewrote in Zig or Rust, because the Swift compiler kept giving me vague error messages with no hint which Swift file was the culprit or/and which line/column the error was.

YMMV