< The Science of Programming < SwayPresentations < Objects

So you really want multiple inheritance?

   function super()
       {
       var x = 3;
       var z = x * x;
       this;
       }
   function duper()
       {
       var y = 4;
       var z = y * y;
       this;
       }
   function sub()
       {
       extends(super());
       extends(duper());
       }
   inspect(sub() . x);
   inspect(sub() . y);
   inspect(sub() . z);

What would you expect the value of z to be?


Next Previous Top

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.