Why is this a pointer
Why is
this
a pointer?
Because it is, and it is just the way the programming language was designed. (I think it is also because it was left over from C, but I am not sure).
rather than a reference?
If you need a this reference, use *this
.
Can it never be
NULL
?
...no. How could it be?
Why is "
this
" not a reference?
See Bjarne's answer here
Because "this" was introduced into C++ (really into C with Classes) before references were added. Also, I chose "
this
" to follow Simula usage, rather than the (later) Smalltalk use of "self".