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

Because you were comparing Apples to Oranges.

Now try that against D, any .NET language, Nim, Swift, Go, or any other GC language that supports value types and unsafe programming.




Swift is technically not a language with GC I believe. It's probably using reference counting like Objective-C before.


Reference counting is a GC algorithm, despite urban knowledge that describes it as otherwise.

Chapter 5 on the "The Garbage Collection Handbook",

https://gchandbook.org/contents.html

Or if you prefer chapter 2 on "Uniprocessor Garbage Collection Techniques" https://www.cs.cmu.edu/~fp/courses/15411-f08/misc/wilson94-g...

Plenty of SIGPLAN papers about the subject.

Despite all marketing talk, the real reason why Swift went with ARC was easier interoperability with Objective-C, otherwise Apple would need to build something like .NET's RCW/CCW for COM interop on Windows, which follows the same concept as Cocoa's retain/release calls.




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

Search: