Hacker News new | past | comments | ask | show | jobs | submit login

We are talking about device drivers and OS kernels, as well as mission-critical realtime code that can't tolerate random latency injections (garbage collection). It's important to have a safe alternative to C and C++ in these contexts.



Naive question - what makes Swift less suitable than Rust for this?


Swift doesn’t make low-level control of memory and other low-level details easy.

Long-term: I feel that Swift was meant as Apple’s answer to C# and as way to retain XCode users as Objective-C became increasingly unfashionable over the past decade and Apple lost employees who could properly maintain it. Swift won’t go away, but I suspect that Apple doesn’t want to have to pay to maintain Swift while the rest of the industry gets to use it for free and port it to platforms that Apple won’t see any revenue from: i.e. Apple doesn’t want to be like Sun/Oracle and have other companies (Google) use their work (Java) for a competing platform (Android’s Dalvik).

So, I’m wary of adopting Swift - while Apple does currently support it on non-Darwin platforms right now I fully expect Apple to lose interest in maintaining first-class support for Windows and Linux at some point, just like how OpenStep was repurposed as a Mac-only when it became the rational decision for them.

Maintaining a thriving developer ecosystem and platform requires a degree of trust, transparency and a history of commitment to a product - and Apple (as a company) is the anathema of transparency.


Apple does write software for other platforms [1][2]. If they continue their shift to services I only expect that to increase.

However I think you are correct in that they won't want to put much effort into it. Their support for developers is already somewhat half-hearted if you compare it to Microsoft. Using XCode over the last few months has made me appreciate how good Visual Studio is. Apple's developer documentation has me missing Microsoft's.

[1] https://play.google.com/store/apps/developer?id=Apple+Inc.&h... [2] https://support.apple.com/en-gb/HT210384


Isn't Swift limited to just a few platforms?

It seems that it's not available both for the largest desktop platform, Windows, and for the largest non-desktop platform, Linux on ARM (https://swift.org/blog/swift-linux-port/ says "Currently x86_64 is the only supported architecture on Linux.") i.e. all the IoT devices which need code in a "systems language" and Android phones.


Swift doesn’t have sufficient control over memory (where things get allocated and using or avoiding the reference counted garbage collector).


There do exist real-time GCs, though. And there is no fundamental reason OSs couldn't be written in high-level, managed memory languages. Some of the oldest OSs were.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: