I forgot to mention that I tried to bring Squirrel into the discussion: http://squirrel-lang.org/forums/ShowThread.aspx?PostID=3621
I have further summary there why conflation of sub-datatyping and sub-classtyping (i.e. virtual/prototype inheritance) is not scalable. That conflation kills the granularity and orthogonality of sub-typing. Interfaces are orthogonal to the object (the data) and thus solve the problem. Also an interface implementation must do what the interface is documented to do. One shouldn't design an inheritance where one gets CBag semantics when code has a CSet reference, that break CSet semantics from which it was inherited from (see the specific example I had linked in prior post for the type of bug this introduces). This was discussed in greater detail at the LTU thread I linked in one of my prior posts. I argued at LTU that OOP hadn't failed, but that humans had failed by misusing virtual interitance. Nevertheless, I can't think of any case where virtual/prototype inheritance is superior to using an interface for interoperability scalability (i.e. OOP goals). Can you? Dynamic lovers might argue that enforced interfaces are a barbaric relic, but I don't see how one can possibly get scalable code without them? You could revert to check for interfaces dynamically, but then you proliferate exceptions. That eventually deadlocks composeability at some exponential rate of mashups. Nature builds complex systems from well ordered simple systems, i.e. fractals and chaos theory. It is not wise to introduce complexity into the building blocks. That illusion of flexibility actually kills the ability to build more complex mashups. -- Neko : One VM to run them all (http://nekovm.org)
