Re:For Better Computing, Liberate CPUs from Garbage Collection
by mcguire on Thursday May 09, 2019 @01:16PM
(#19870136)
?
C++ and Objective C inherited C's memory model and thus don't have a good memory management option. Rust is explicitly a systems language, meaning stronger memory models are out of scope, and then inherited most of C++'s idioms.
Other than those, what popular languages are specifically choosing reference counting as a primary GC method?
Re:For Better Computing, Liberate CPUs from Garbage Collection
by steveklabnik on Thursday May 09, 2019 @01:20PM
(#19870163)
Swift.
Re:For Better Computing, Liberate CPUs from Garbage Collection
by pjmlp on Friday May 10, 2019 @07:36AM
(#19876807)
Swift requires reference counting for compatibility with Objective-C code.
Apple could have gone the .NET way (RCW) to interface with COM reference counting, but that naturally would complicate the bindings to Objective-C runtime and existing libraries.
But no one can seriously claim that GC is a magic bullet, because it's only clearly winning against plain C.
Carefully designed, popular languages are choosing RAII and reference counting implementations and those are very competitive.