It's also possible to create a generic descendent of TCollection, where the only duplicated code is the property override. This is probably the best of both worlds: reusing the TCollection while moving to generics. Best regards Thierry ----- Mail Original ----- De: "michael vancanneyt" <michael.vancann...@wisa.be> À: "FPC-Pascal users discussions" <fpc-pascal@lists.freepascal.org> Envoyé: Mardi 8 Novembre 2011 13h22:31 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [fpc-pascal] Generics vs TCollection
... The difference is mainly that in the case of TCollection(Item) you need to override the items property; With generics, you can skip this step. At the expense of copying the whole TCollection code each time you create a specialized descendent. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal