3 ms·
nobody says you should always use reference instead of pointer in C++
by mshockwave 4y ago
nobody says you should always use reference instead of pointer in C++
- bodhiandphysics 4y agoLots of people say this... they’re wrong but the day this
- leni536 4y agoI do prefer references, because they can't be null. It is less state to worry about. I agree that not having explicit out-parameters makes this a trade-off. It is possible to use an out-parameter wrapper type to get the best of both worlds, but nobody does this.