🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.java
Article #21

Re: Are "super" and "this" different objects?

#21
From: Vladimir Alexiev
Date: Fri, 27 Oct 1995 22:09
19 lines
1480 bytes
In article <vwjbur5e1td.fsf@osfb.aber.ac.uk> pcg@aber.ac.uk (Piercarlo Grandi) writes:

> In other words, in Smalltalk 'self == super' is true by definition, and
> it is only method lookup that differs.
> [In this respect C++ is] Exactly like in Smalltalk...

Actually since C++ has multiple inheritance, it can be different. Now, C++
does not have "super" to begin with, so we have to be a bit flexible in our
comparison. Consider
  class A : B, C
Then if a is a pointer of type A, (void*)a==(void*)(B*)a, however
(void*)a!=(void*)(C*)a, because the subobject C does not start at the same
offset as A (while B does).

> BTW, you are the second person in a day to display a gross
> misunderstanding of Smalltalk fundamentals -- and this is not by chance,
> or your fault alone.

I wouldn't say the poster displayed any better understanding of C++ either.
Technical Details
Message-ID: <omloq6h948.fsf@tees.cs.ualberta.ca>
Path: arc1-ca.pugleaf.net!rover.ucs.ualberta.ca!alberta!usenet
References: <1995Oct23.154442.6836@schbbs.mot.com> <vwjbur5e1td.fsf@osfb.aber.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!rover.ucs.ualberta.ca!alberta!usenet
From: Vladimir Alexiev <vladimir@cs.ualberta.ca>
Newsgroups: comp.lang.java,comp.object,comp.lang.c++
Subject: Re: Are "super" and "this" different objects?
Date: 27 Oct 1995 16:09:27 -0600
Organization: University of Alberta, Computing Science
Sender: vladimir@tees.cs.ualberta.ca
Message-ID: <omloq6h948.fsf@tees.cs.ualberta.ca>
References: <1995Oct23.154442.6836@schbbs.mot.com>
 <vwjbur5e1td.fsf@osfb.aber.ac.uk>
NNTP-Posting-Host: tees.cs.ualberta.ca
In-reply-to: pcg@aber.ac.uk's message of 25 Oct 1995 20:38:38 +0000
X-Newsreader: Gnus v5.0