Comment on What to learn next, Swift or Rust
aggelalex@lemmy.world 1 year agoDon’t get me wrong, Swift is OSS and there are things you can do with it apart from front-end dev, but there are usually better options out there for those other things. For example if I want an HTTP server, I’d choose JS, Kotlin, Rust, etc.
abhibeckert@lemmy.world 1 year ago
I wouldn’t. Swift is definitely better than any of those choices… and I’ve got decades of experience writing HTTP services.
I don’t currently use Swift for that - but only because it’s a relatively immature language and I’m generally a late adopter. I definitely intend to switch over to Swift at some point in the near future and it’s what I recommend for someone starting out today.
BatmanAoD@programming.dev 1 year ago
I’m not a performance expert by any means, but…it seems like the bit about there being “no situation, ever” in which a garbage collector that “worked just as well as in any other language” outperformed reference-counting GC. The things I’ve read about garbage collection generally indicate that a well-tuned garbage collector can be fast but nondeterministic, whereas reference-counting is deterministic but generally not faster on average. If Apple never invested significant resources in its GC, is it possible it just never performed as well as D’s, Java’s, or Go’s?
abhibeckert@lemmy.world 1 year ago
Chris Lattner, one of the world’s best compiler engineers and the founder of not only the Swift language but also LLVM which backs many other languages (including Rust, by the way), went into it in a nice high level but detailed discussion here:
atp.fm/205-chris-lattner-interview-transcript#gc
Chris briefly talks about the problems in the Apple GC implementation, but quickly moves onto comparing ARC to the best GC implementations in other languages. The fact is they could have easily fixed the flaws in their GC implementation but there just wasn’t any reason to. ARC is just so much better.
Apple’s GC and ARC implementations were both implemented at about the same time, and when ARC was immature there were situations where GC worked better. But as ARC matured those advantages vanished.