Re: Oops, super() can't work!

Jaap Vermeulen (jaap@sequent.com)
Wed, 12 May 1993 08:52:38 -0700

| name that extends their base class's version. Now if we have an
| instance of C, the C version will call the B version alright, but the
| call to super() in the B version will not retrieve the A version of
| the method -- it will retrieve the B version again. This is because
| even during execution of the B method, the type of self is still C.

Damn! You're right. What a drag. The only thing you could try to do
is matching the actual code object, but that becomes a kludge.

| reorganization of the interpreter and code generator. How does
| Smalltalk do this? I know that Simula has a "super" construct in the

No idea. But Smalltalk is inherently organized and structured
differently.

| My only hope is that perhaps Steve Myale of U of Virginia has already
| fixed this in his mods to eliminate self and introduce private and
| public variables (and much more). Steve? (We'll need to discuss your
| changes to the language on the list anyway, before they can become an
| official part of it.)

I would like to see a proposal for these changes. I'm very much interested.

I guess the bottom line of this discussion is:

Some of my proposed changes would have been nice and transparent to the
programmer, however, I'm sure I can live without. I'll soon be
implementing another piece of code using classes extensively, so,
again, I'll try to gauge how well Python is holding up!

Thanks for this discussion,

-Jaap-

--
Jaap Vermeulen					+--------------------------+
						| Sequent Computer Systems |
	Internet : jaap@sequent.com		| Beaverton, Oregon	   |
	Uucp	 : ...uunet!sequent!jaap	+--------------------------+