[fpc-pascal]Any plans for multiple inheritence?

paradice paradice at paradicesoftware.com
Thu May 1 09:13:38 CEST 2003

Just wondering, are there any plans for implementing multiple class
inheritence in the FPC compiler? So that you can have a class that inherits
from two separate ancestors, and can override or call  methods contained in
either of them. In most [maybe all] cases you can work around; usually by
making one of your ancestor types descendent from the other [not ideal...],
or implementing the shared methods twice, but multiple inheritence can
occasionally be a handy feature.

example given: A "magic mirror" needing to inherit stuff from both "mirror"
classes and from "magic items" objects:

    mirror = class
       procedure see_mirror; virtual;

    magic_items = class
	  procedure activate_magic; virtual;

    magic_mirror = class (mirror,magic_items)
       procedure see_mirror; override;
       procedure activate_magic; override;
	  {etc etc}

More information about the fpc-pascal mailing list