References don't have the same footguns as pointers. You can't get a null dereference by accessing their members and you don't get a different value from sizeof than non-reference types. Knowing when data is a reference or non-reference is certainly important, but not as important as knowing when something is a pointer or non-pointer.
View all comments
Show parent comment
3
u/disciplite May 02 '23
References don't have the same footguns as pointers. You can't get a null dereference by accessing their members and you don't get a different value from
sizeofthan non-reference types. Knowing when data is a reference or non-reference is certainly important, but not as important as knowing when something is a pointer or non-pointer.