[fpc-pascal] Traits Proposal
Ryan Joseph
genericptr at gmail.com
Fri Feb 19 20:37:14 CET 2021
> On Feb 19, 2021, at 11:01 AM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> Your example is not quite correct and it's also not really complete: if a class implements an interface there *must* be a parent class mentioned (at least TObject). Also your example should demonstrate that one can call TMyShape.Draw without having to retrieve the interface (after all that's the point of the interface property).
>
TObject is always the root class I thought? Why is it different here?
> Additionally support for raw interfaces (aka Corba) should be added for interface delegation if it isn't already supported. (Otherwise your TMyShape either needs to inherit from e.g. TInterfacedObject or one of the involved types needs to implement the methods of IInterface.
>
They work already fortunately.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list