[fpc-pascal] implements

Ryan Joseph ryan at thealchemistguild.com
Sat Sep 2 10:38:31 CEST 2017


> On Sep 2, 2017, at 3:27 PM, Graeme Geldenhuys <mailinglists at geldenhuys.co.uk> wrote:
> 
> Please search the internet about Interfaces and probably Design Patterns too. Have ever heard the phrase: "Code to an Interface, not an Implementation".
> 
> Interfaces are so much more than simply "adding methods to a class".

I understand interfaces just fine but I don’t understand why you want a class to appear as if it implements an interface but then having to call methods on a 2nd class. It separates the code (which is nice) but then gives you an annoying extra step of typing hook.XXX for every method. It just feels broken and not complete as a feature.

Furthermore if you know that a class implements an interface but you need to call another variable (like hook) then how do you know the name of the variable??? I use interfaces often but that would break them for me in most cases.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list