Re:Modern C for C++ Peeps
by BenFrantzDale on Sunday January 08, 2023 @09:34AM
(#34299402)
To clarify, I think by “move things from stack to heap” you mean “move values from stack to heap”, where, e.g., `std::vector<int>` is a value. The vector’s data is still on the heap (or in the allocator’s pool for `std::pmr::vector<int>`) but the value in the sense of value-semantics is moved from stack to heap.
It has been many years since I found a use for an abstract virtual base class.
Literally millions of people understand it all, and use it every day with no difficulty. You don't need to invent difficulties, or waste days "proofing" code that may be written exactly once and never touched again.