7 ms·
I think the criticism, “But you were writing C++ wrong” falls more than a little flat. The Firefox codebase may be old, but even with teams of good, experienced
by klodolph 6y ago
I think the criticism, “But you were writing C++ wrong” falls more than a little flat. The Firefox codebase may be old, but even with teams of good, experienced C++ programmers I still see memory errors of the type that Rust is designed to prevent.
Anyway, you are unlikely to avoid pointers completely in a good C++ codebase. Value semantics are very often the wrong semantics for the code you are trying to write. You can end up with dangling references as easily as you can end up with dangling pointers. If you use std::shared_ptr everywhere, then what you have is a slow & inefficient GC.