3 ms·
C++ would be a lot better off if references were used more heavily. (And C ought to have references by now.) One still sees too many asterisks in C++ code. Refe
by Animats 9y ago
C++ would be a lot better off if references were used more heavily. (And C ought to have references by now.) One still sees too many asterisks in C++ code. References are not supposed to be null. Sometimes they are, though, because there's no checking when a pointer is converted to a reference.
"this" should have been a reference, not a pointer. Strostrup admits that was a mistake.
- FartyMcFarter 9y agoPointers are easier to read than non-const references though (since they're more explicit).
- gpderetta 9y agotechnically references can't be null ever. To create a null reference you would have to deference a null pointer and then you are into nasal demons territory. /pendantic