The Science of Programming/SwayPresentations/Objects/Examples6

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