10 ms·
with const pointers you have the different problem that you need to define what happens when the nullptr is passed. While I would certainly prefer the referenc
by dureuill 3y ago
with const pointers you have the different problem that you need to define what happens when the nullptr is passed.
While I would certainly prefer the reference to be visible at the call site (a mistake Rust did not repeat), if I have to choose, I prefer the inconvenience of having to use an IDE like qtcreator that will display references in a different style, to introducing an invalid value that needs to be handled (and will be mishandled).
So yeah, as a senior dev, it checks out.