[fpc-pascal] implements

Ryan Joseph ryan at thealchemistguild.com
Tue Sep 5 06:05:53 CEST 2017

> On Sep 2, 2017, at 6:56 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> As Graeme said: the point is to code against interfaces, not classes. Don't pass around or work with the TBaseClass instance, instead only with the IHook interface. And this is what the implements feature is for.

Sorry I forgot about this.

So I learned that Supports() returns the correct interface (IHook in my example) and THAT I can see is helpful now because the implementation of the interface can be shared across many classes. That’s what I was looking for in terms of a practical use patterns for “implements properties”. I should have seen that at the start but I’m still hung up on how it’s implemented.

	Ryan Joseph

More information about the fpc-pascal mailing list