[fpc-devel] Interface delegation fix: backport to FPC 2.4.2 ...?

Inoussa OUEDRAOGO inoussa12 at gmail.com
Wed May 19 22:31:16 CEST 2010

Le 19 mai 2010 19:33:14 UTC, Matt Emson <memson.lists at googlemail.com> a écrit :
> Sent from my iPhone
> On 19 May 2010, at 17:52, Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:
>> On 19 May 2010 17:36, Marco van de Voort wrote:
>>> I don't see why the observer pattern is needed at such low level any more
>>> than 20 other little handy features that each would be a lot easier if they
>>> just had a field/property in the baseclasses.
>> Marco, not trying to be rude, but please take a step back, see the big
>> picture and listen to yourself. You sound totally ridiculous - it's to the point of being funny.
> I don't think so. I'd hate to see any specific pattern being implemented at a base level. Why? Exactly what Marco said. Patterns are faddy - you are not going to please everyone. I'd rather see a mechanism for injecting first class extensions to existing classes. That way, it really doesn't matter what pattern is implemented where. That would be far more worthwhile IMO.

Agreed. This mechanism exists in Delphi and is called "class helper",
see http://docwiki.embarcadero.com/RADStudio/en/Class_and_Record_Helpers
See some samples :
    * What are good uses for class helpers? at
    * class helper to add for … in support for TComponent.Components /
ComponentCount at
    * and New Delphi language features since Delphi 7 at

Best regards.
Inoussa O.

More information about the fpc-devel mailing list