Derived Classes in ::SHE+ILA::, using "-::>" or ":" [$63]

Vibrant Scene of Ethereal Female Figures and Flowers
41
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • Prompt
    Read prompt
  • DDG Model
    Artflow
  • Access
    Public
  • Created
    9h ago
  • Try

More about Derived Classes in ::SHE+ILA::, using "-::>" or ":" [$63]

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;")

Comments


Loading Dream Comments...

Discover more dreams from this artist