Would make 'this' a link, rather than a pointer, better in retrospect?

Possible duplicate:
Why & & lsquo; this & rsquo; is a pointer, not a link?

Is there any reason for this in C ++ as a pointer and not a link other than a historical language solution? This seems strange given that, for example, to copy the constructor or assignment operators accept " that " as a reference, rather than a pointer.

[Honestly, I could not find this question, although it really looks like a possible duplicate]

+7
c ++ language-design
source share
2 answers

Links did not exist in the language when this was created.

+4
source share

From Bjarne Stroustrup, "Design and Evolution of C ++," Addison-Wesley, 1994, pp. 39-40:

Sometimes people ask why this is a pointer, not a reference, and why it's called this , not self . When this was introduced in C with classes, the language had no references, and C ++ borrowed its terminology from Simula, not Smalltalk.

+7
source share

All Articles