[Grace-core] super in Grace

James Noble kjx at ecs.vuw.ac.nz
Sun Feb 6 15:25:02 PST 2011


> I'm finally catching up with this conversation on "super".

good, good...

> My main concern is that the meaning of "super" in all languages that I know of is static.  That is, if I write
> class C ... extends B {
>   method m(...) {
>         super.m(...)
>         ...
>   }
> ...
> }
> 
> and then
> 
> class D ... {
>   ....   // no overriding of m
> }
> 
> Then when the inherited m is executed, super.m still results in executing the version of m from B.  This is a GOOD thing if you start looking at examples of where you might want to do this (horrible tangles would result if it was reinterpreted when inherited).

yep - I don't think anyone is considering changing that
 (even Newspeak - I checked :-)
although Newspeak superclasses are not static   (B would be a virtual class in Newspeak)

Turns out Newspeak has: sends, explicit self sends, implicit self sends, super sends, outer sends. 

> So, while I agree that it is confusing to have it look like a message send, we must end up with an implementation and surface syntax that make sure that it stays static like current languages.

yep. 
> 
> P.S.  A few more details on the syntax, type-checking, and semantics of super are available in chapter 14.1 of my FOOL book -- I'm sure you all have it sitting open on your desk!

well it is close by, I must admit.
My question 

> P.P.S.  Go Packers!! (The superbowl starts in 30 minutes for those of you out of the states.)




More information about the Grace-core mailing list