[fpc-devel] Generics.Collections as package for Lazarus or package for FPC RTL

Maciej Izak hnb.code at gmail.com
Thu Jan 28 01:13:49 CET 2016

2016-01-28 0:38 GMT+01:00 Sven Barth <pascaldragon at googlemail.com>:

> Why would each collection instance need to contain an instance of the
> comparer? They don't contain state and are reentrant, so they can be easily
> shared with ARC singletons.
> Note: there would either need to be a global variable for each instance or
> a list that gets automatically finalized as well (e.g. as a stupid
> implementation an array of IInterface). Then if Generics.Defaults is
> finalized before the other unit using it only the reference count will be
> decreased and only when the other unit is finalized the comparer will be
> destroyed.
Yes it can be done in that way, but I want to avoid this (It will
complicate other things). In Generics.Defaults manual interfaces are easier
to maintain. Manual interfaces are more solid construction. They are more
resistant for improper use than regular ARC interfaces. You did not specify
any technical argument to discrediting manual interfaces implementation in
Generics.Defaults. Just a feeling :P. Your only technical argument has been
Best regards,
Maciej Izak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160128/5dd8ff32/attachment.html>

More information about the fpc-devel mailing list