2 ms·
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
by CyberDildonics 4y ago
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.
- pjmlp 4y agoThe 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.
- jandrewrogers 4y ago> 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.
- pjmlp 4y agoI suggest the same, unless your industry experience for some strange reason is more representative than mine.
- CyberDildonics 4y agoGood 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.