28 ms·
I disagree with that classification, as there's no "garbage" state for references as they are destroyed immediately. All garbage collecting languages on the oth
by viktorcode 6y ago
I disagree with that classification, as there's no "garbage" state for references as they are destroyed immediately. All garbage collecting languages on the other hand have period of time where the references are intact but marked as garbage.
FWIW Chris Lattner, the language creator, put Swift into a non-GC camp.
- pjmlp 6y agoBecause he needs to sell it, and Apple developers got a bad taste of Objective-C GC implementation that never worked out properly. Widely acknowledged CS books see it differently, https://gchandbook.org/ https://gchandbook.org/
- pulse7 6y agoEven in Swift the references are not "destroyed immediately" but because of various performance optimizations this "garbage state removal" is deferred - for example to the end of scope... The truth is, that they >>don't want to call it GC<< for marketing and other reasons... One could implement ARC with cycle collector for Java as well - and it would be just another form of GC... it would use less memory (because garbage would be released faster), but it would be slower...