timvw wrote:Hockey wrote:
I agree on every level, except PHP being fully OOP...
Still doesn't have support for MI??? or does it?
- What are the/your requirements for a language to be "full" OOP?
- And how many times has the lack of Multiple Inheritance ever stopped you to do OOP with PHP?
1) Good question. Not sure what I would define as "full" OOP...
A quick break down:
- Inheritance & MI
- Composition
- Access control (public, protected & private)
- Virtual functions & polymorphism
- RTTI and runtime object instantiation
- ABC's
- CTors() and DTors() which are inherited

- ADT & operator overloading
- Templates
- Nested class support
- Static methods
- Inline or interface/implementation methods - more of a parse issue than OOP

- Const methods
- Namespaces
- Method overloading/overriding
- Upcasting/Downcasting
- Exception handling
I'm sure I'm missing something, but thats a short list - at least what I've personally come to expect from an language thats touted as OOP...
Granted, some of what I listed above are better left in the domain of a compiler than the ideology of OOP, some of those features listed are important when working with OOP. For example consider the
const methods...thats a nice feature
p.s- I know PHP supports some, if not many of the above, but it doesn't and probably won't support full OOP, until it becomes a natively compiled language (if ever).
p.s.s-I am not trying to advocate the use of MI nor am I saying it's "absolutely" required, but it does play a role in OOP IMHO.
2) Ok, so it doesn't happen very often

. Obviously it's easy to work around and many would argue better fundamentally to do so, but I still argue that it is a feature requirement for OOP.
OOP is all about modeling real world objects or organisms. Most living creatures come from not one parent, but two. So IMHO it makes sense to offer MI as a fature of OOP for that very reason.
Sure you could have a father class and a mother class derived from it and a child class derived from mother class, or you could even use composition (Mother and father inside the child) but IMHO it's not as axiomatical as using MI.
Thats my argument towards using MI. It may cause problems, but if used properly by an experienced developer (which I consider myself) it's a cleaner approach to solving a problem (at face value).
Like using BNF over hand-written parsers...both can accomplish the same task...but one, at face value (BNF) makes immediate sense (once you know what BNF is).
Thats my story and i'm sticking to it
Cheers
