So one could say that the mixins are inserted in to the inheritance chain. I think I got it now.

> You can't say `super.super`, you can't get around the built-in
> inheritance chain. This is part of the power (and danger) of mixins. > With a single-inheritance language, it should not be too surprising or > confusing. It gets more complicated if your language is a
> multiple-inheritance language (more than you probably every want to
> know about the issue here: http://bit.ly/6iixlA).

Thanks for the link. Unfortunately it requires payment however the abstract has this to say about the dangers of super.super

"Recent work has defined several desirable characteristics for linearizations, the most important being monotonicity, which prohibits inherited properties from skipping over direct superclasses"
...
"a monotonic linearization enables some compile-time method selection that would otherwise be impossible in the absence of a closed-world assumption"

So if you don't mind I would like to know what would be the danger of skipping on superclass?

And could the compiler not know exactly the same way which method to call even if super.super was used? Since it must know the complete inheritance hierarchy then when encountering super.super it would know to go 2 levels up instead of just one.

And you can omit all considerations of multiple inheritance since laszlo (and javascript) do not have it. (As a matter of fact isn't the keyword super always ambiguous in case of multiple inheritance?)

- rami

Reply via email to