Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
In C++ we would say
class Derived : public Base { ...
In ::SHE+ILA:: we so far would say
Derived <::- Base;
or Base -::> Derived;
These both instantiate an instance of Base (::SHE+ILA:: treats a derived class the same as an instance of a class until you override its methods or attributes -- see below). When you instantiate the Derived class, those instances inherit from Derived (see appropriate Description). Anyway, we want be able to write this as :
Derived : Base
rather than
Derived <::- Base
. It's just a matter of style really.
As soon as you write something like
Devived : Base (woo=42, squee=137, foo={ttyout("Yay")});
you have overridden woo and squee, and added a method foo; so you have an actual class template you can re-instantiate. This inheritance works similarly to nested procedure's intermediate locals (which see), except the store is in the segment rather than in the stack frame. Effectively an Insert of the new members has been done to the definition, so we have both the Base elements followed by the Derived elements. (This is why ::SHE+ILA:: does not implement "multiple inheritance", i.e. we can't say something like
"class Wooity : public Janet, Julia;")