News for hackers. Stuff that matters.
Re:C++ Papercuts by dureuill on Monday August 28, 2023 @08:10AM (#37292832)
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.

There are no comments on this comment yet.