News for hackers. Stuff that matters.
Re:The origins of Objective-C at PPI/Stepstone and its evolu... by cmrdporcupine on Sunday June 14, 2020 @04:37PM (#23521118)
Someone else has made this point below, but I'm not sure where this misunderstanding comes from. Reference counting is a form of garbage collection.

My copy of Jones and Lins "Garbage Collection" textbook includes Reference Counting as its first item its "classical algorithms" chapter.

It's usually non-tracing, but variants that can cycle collect will even do some limited tracing to resolve cycles.

And the original comment about latency still stands, even for RC. A single de-reference can lead to a whole series of collections, taking an unknown amount of time, and thrashing cache in the process. A deep tree of objects deleted at the top creates a cascade of de-references. And modern high level languages tend to encourage deep object trees.

When doing realtime programming, I avoid anything with GC. Out of experience. Yes it is possible to tune GC for realtime performance -- but it's fiddly, and never perfect. There are systems tuned for incremental realtime collection -- but there is a cost to this.

As software engineers our job is to pick the right tool for the job. I had many years usually almost exclusively garbage collected languages (including Objective C) before ending up where I am now (I work mainly in C++ lower down the stack)

Manual memory management still exists for a reason.

Re:The origins of Objective-C at PPI/Stepstone and its evolu... by jolux on Monday June 15, 2020 @09:05PM (#23534902)
I'm sure I sound like a broken record but Rust has solved the problem of memory safety lower in the stack pretty well with the borrow checker. There is almost no reason to use unsafe code aside from interop.
Re:The origins of Objective-C at PPI/Stepstone and its evolu... by cmrdporcupine on Monday June 15, 2020 @10:29PM (#23535393)
Sure, I'd be into it, if someone would pay me to work in Rust. That hasn't happened for me yet.

But there is a cognitive overhead cost to working with Rust. Or even just following consistent RAII patterns in C++. It doesn't come for free.

Trade-offs.

Re:The origins of Objective-C at PPI/Stepstone and its evolu... by jolux on Tuesday June 16, 2020 @06:26PM (#23545065)
Yep. ‘Tis true. I keep telling Rust people that I could do with less syntactic overhead and that sometimes I just want GC, but I don’t think it’s a priority for the community and they already have a lot on their plate and it does basically everything else right, imo.