News for hackers. Stuff that matters.
Re:What Should I Know About Garbage Collection as a Java Dev... by pjmlp on Wednesday January 11, 2023 @01:38AM (#34335772)
Good luck implementing lock free algorithms without the help a GC (of any form).
Re:What Should I Know About Garbage Collection as a Java Dev... by CyberDildonics on Wednesday January 11, 2023 @07:56PM (#34347576)
This is done all the time, I don't know where people get the idea that a GC is some sort of magic that enables lock free algorithms. There are tons of modern C++ lock free algorithms out there.
Re:What Should I Know About Garbage Collection as a Java Dev... by pjmlp on Thursday January 12, 2023 @01:25AM (#34349921)
The magic is called productivity and helping hand.

There are also lock free algorithms written in Assembly, that doesn't mean the authors had any fun writing them.

Unfortunately Modern C++ is mostly found in conference talks.

Most the real life code looks quite Orthodox C++ to me, including from big name ISO members on their SDKs.

Re:What Should I Know About Garbage Collection as a Java Dev... by jandrewrogers on Thursday January 12, 2023 @02:45AM (#34350400)
> Unfortunately Modern C++ is mostly found in conference talks.

I would suggest that you might be projecting your experience on the rest of the industry. I’ve seen nothing but modern C++ at several companies for the last decade. I haven’t seen legacy C++ anywhere in a really long time, thankfully. I occasionally see very early C++11, which is definitionally modern though dated by modern standards. Baselines tend toward C++17 these days on average.

Re:What Should I Know About Garbage Collection as a Java Dev... by pjmlp on Thursday January 12, 2023 @04:14AM (#34351021)
I suggest the same, unless your industry experience for some strange reason is more representative than mine.
Re:What Should I Know About Garbage Collection as a Java Dev... by CyberDildonics on Thursday January 12, 2023 @11:07AM (#34355617)
Good luck implementing lock free algorithms without the help a GC

The magic is called productivity

that doesn't mean the authors had any fun

You went from implying that it can't be done, to saying a GC is about productivity, to saying it's about "fun". The goal posts are all over the place here.

Meanwhile, I've done it over and over in C++. The reality is that memory allocation shouldn't be a big part of a fast data structure anyway, let alone a good lock free algorithm, because if you're relying on allocation that much you are hopping around in memory, not to mention leaving a big part of your data structure to a black box.

Unfortunately Modern C++ is mostly found in conference talks. Most the real life code looks quite Orthodox C++ to me, including from big name ISO members on their SDKs.

I don't know what either of these is supposed to mean.

If you want to be explicit, tell me what algorithms need a garbage collector, because this all sounds a lot more like something you want to be true or want other people to agree with than something learned from extensive experience.