Earlier quoted context omitted.
> P&L research What’s P&L? > Java's verbose semantics Does Java have verbose semantics? I think Java’s semantics are pretty neat and concise. Where’s the verbosity?
Not OP, but someone who has gotten paid to write Java for several years. I would say that isn't that Java's semantics are that verbose, it's that the way Java is traditionally written, with every line actually 3 lines on your screen of public function makeItalicTextBox(String actualTextIWantToBeItalic) { ItalicTextBox itb = italicTextBoxFactoryGenerator.GenerateFactory().buildItalicTextBox(actualTextIWantToBeItalic);…
Reference count, don't garbage collect
171–180 of 415 posts
Re: Reference count, don't garbage collect
#172Re: Reference count, don't garbage collect
#173This debate has gone round and round for decades. There are no hard lines; this is about performance tradeoffs, and always will be. Perhaps the biggest misconception about reference counting is that people believe it avoids GC pauses. That's not true. Essentially, whereas tracing GC has pauses while tracing live data, reference counting has pauses while tracing garbage. Reference counting is really just another kind…
For a unifying term I prefer Automatic Memory Management. One reason is that GC is already universally used to mean only tracing garbage collection, and trying to defend its wider meaning is a pointless uphill battle. Another is that is suits the job much better, because not every AMM technique works by producing garbage then collecting it, you know.
Re: Reference count, don't garbage collect
#174Earlier quoted context omitted.
How do you collect cycles without a pause?
There are solutions to this one. Real time garbage collectors are a thing. You just might not be able to collect the cycle in one GC run. Or you can do what Erlang does: Erlang has neither mutation nor laziness, so you can't create cycles. The GC also lays out object in topological order in memory, so that you can detect garbage without tracing every life object.
Re: Reference count, don't garbage collect
#175Earlier quoted context omitted.
How do you collect cycles without a pause?
I'm gonna take a guess they dedicate a core to GC (or something along these lines).
Re: Reference count, don't garbage collect
#176Earlier quoted context omitted.
I'm gonna take a guess they dedicate a core to GC (or something along these lines).
That's not enough. Imagine a circular linked list. GC looks at an outside pointer to item A in it. Now another thread removes A from the list and moves the outside pointer to the next item. After that, GC would see all items in the list not referenced by anything (apart from the cycle).
Re: Reference count, don't garbage collect
#177Earlier quoted context omitted.
How do you collect cycles without a pause?
There are solutions to this one. Real time garbage collectors are a thing. You just might not be able to collect the cycle in one GC run. Or you can do what Erlang does: Erlang has neither mutation nor laziness, so you can't create cycles. The GC also lays out object in topological order in memory, so that you can detect garbage without tracing every life object.
Re: Reference count, don't garbage collect
#178Re: Reference count, don't garbage collect
#179Re: Reference count, don't garbage collect
#180Earlier quoted context omitted.
There are solutions to this one. Real time garbage collectors are a thing. You just might not be able to collect the cycle in one GC run. Or you can do what Erlang does: Erlang has neither mutation nor laziness, so you can't create cycles. The GC also lays out object in topological order in memory, so that you can detect garbage without tracing every life object.
Where can I read about Erlang’s magic?