::SHE+ILA:: Inheritance in nested procedures, and the display list [$5A]

Elegant Women in Purple Dresses Against Ornate Backdrop
44
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • Prompt
    Read prompt
  • DDG Model
    DaVinci2
  • Access
    Public
  • Created
    6h ago
  • Try

More about ::SHE+ILA:: Inheritance in nested procedures, and the display list [$5A]

Suppose we have a nested procedure (i.e. one procedure inside another one) :
Foo <:: &{ (a=1, b=1, c=42, Bar) {do something here; Bar ("woo");
Bar <:: &{ (d=2, e=2) { do something else here};
};
Bar can see the base procedure's local variables as "intermediate variables"
because the substruct "(d=2, e=2)" which defines Bar's locals is appended to Foo's locals "(a=1, b=1. c=42, Bar)".
This is like the derived-class inheritance mechanism, whereby a derived class has protected access to its base class fields.
Algol uses a "display list" to implement this (not to be confused with an Atari 800 "display list" which is a set of instructions for its Antic GPU).
Again, if we want to keep certain locals "private" from this mechanism, we prefix their names by "£", for example
"(a=1, £b=1, c=42, Bar)".

Comments


Loading Dream Comments...

Discover more dreams from this artist