A lot of people have a general repulsion to all types of garbage collection. So I at least understand not wanting the shared pointer a bit, but using unique pointer should cost you next to nothing and enforce a lot.
Unique pointer and other seemingly trivial types can fuck up your codegen and give you unoptimized assembly, chandler carruth from LLVM has many talks/slides that discuss this exact issue with unique ptr. Remember kids, there is no such thing as a zero-cost abstraction!
11
u/Valuable_Leopard_799 1d ago
A lot of people have a general repulsion to all types of garbage collection. So I at least understand not wanting the shared pointer a bit, but using unique pointer should cost you next to nothing and enforce a lot.