|
|
Orchid XP v7 <voi### [at] devnull> wrote:
> Well, take multiple inheritance for example. If your language supports
> multiple inheritance, it can't support using the "super" keyword,
> because it could refer to several different classes. (With single
> inheritance, it is obviously quite unambiguous.) So even if you never
> ever actually use MI, if the language your using supports it, it stops
> you from being able to have a super keyword to use. You'll have to refer
> to superclasses some other way.
The solution is rather simple: One of the base classes is the "super"
class, the rest aren't. (This can be differentiated with keywords when
inheriting, or even by the order in which the inheritance list is
specified: The first base class mentioned can be the "super" class.)
Think of it as the rest of the base classes being interfaces with
support for member variables and function implementations.
--
- Warp
Post a reply to this message
|
|