Le 19 mai 2010 19:33:14 UTC, Matt Emson <memson.li...@googlemail.com> a écrit : > > > Sent from my iPhone > > On 19 May 2010, at 17:52, Graeme Geldenhuys <graemeg.li...@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 http://stackoverflow.com/questions/253399/what-are-good-uses-for-class-helpers * class helper to add for … in support for TComponent.Components / ComponentCount at http://wiert.wordpress.com/2009/05/07/delphi-class-helper-to-add-for-%E2%80%A6-in-support-for-tcomponentcomponentscomponentcount/ * and New Delphi language features since Delphi 7 at http://edn.embarcadero.com/article/34324 Best regards. -- Inoussa O. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel