logoalt Hacker News

frizlabyesterday at 7:45 PM3 repliesview on HN

Swift on Linux has changed since a few years ago. A lot.

I prefer Swift over rust as it has the same memory-safety guarantees with a much more approachable syntax, and is generally easier to work with.


Replies

hocuspocusyesterday at 7:58 PM

Easy and approachable sound pretty subjective to say the least; feature and syntax wise, Swift has become an absolute monster of a language. Rust's tooling and ecosystem are ahead and these points matter to me more than the raw syntax in the age of LLMs.

show 1 reply
tialaramexyesterday at 8:08 PM

The same condition is still true as the first time I was told "Swift on Linux" is somehow a first class experience:

> Documentation for the standard library is presently hosted on the Apple Developer website.

Sure enough, by Apple policy, the documentation pretends no non-Apple platforms exist. What happens for an API which could be different if your system isn't fruit-flavoured? They don't care and won't talk about it.

Is the feature I need available for this Linux device? No idea, but it does work with watchOS and tvOS made by Apple...

show 1 reply
dhosekyesterday at 9:14 PM

Isn’t there a performance cost though with runtime binding of functions? (I’ve not looked too closely at Swift since the first couple of years when Objective C compatibility was essential, so maybe that’s less of a default than it was in the early days).

show 1 reply