News for hackers. Stuff that matters.
Re:State of Multicore OCaml [pdf] by toolslive on Thursday June 28, 2018 @01:16PM (#17418754)
I don't think that 'slow' is the problem here: C++ developers use shared_ptr almost everywhere, which is just reference counting and hence slower than if they were to use a garbage collector (yes, there are garbage collectors for C++). I think the problem is that the cost is unpredictable. They want absolute control over _when_ things happen.
Re:State of Multicore OCaml [pdf] by int_19h on Thursday July 12, 2018 @12:32AM (#17512198)
> C++ developers use shared_ptr almost everywhere

shared_ptr is rare in idiomatic C++ code, and is only used when you actually have a shared object, or need a cyclic data structure with no clearly identified root. I wrote plenty of modern C++ with not a single shared_ptr in it.

Re:State of Multicore OCaml [pdf] by jcelerier on Thursday June 28, 2018 @03:17PM (#17419677)
not only when, but where : a fairly common pattern is to have computations done in one thread, then once the computation is done and the thread starts another, the shared_ptrs (or any other kind of memory owners) are swapped in another thread and cleared there.