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

I'd say Swift isn't really a C-replacement as it uses ARC which is slower and doesn't need manual management to work (except for a few weak references here and there). It's generally/potentially faster than Java and C# code as it's pre-compiled and it can use C and C++ libraries (perhaps also Rust?) without bridging cost. But ARC is a reliable and constant but slow way to manage memory. The good thing about ARC is that it's the same every time, no weird GC peaks at sometimes difficult to predict intervals.


Only temporarily. One of the next Swift versions (my bet is on Swift 6) will include an optional memory ownership model:

https://github.com/apple/swift/blob/master/docs/OwnershipMan...

It will not have lifetimes but still allow to opt out of ARC for performance critical code.


That's interesting. I bet a lot of people doing performance critical stuff like graphics or audio are going to be interested in this.




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

Search: