[fpc-devel] Standard generic classes
Marco van de Voort
fpc at pascalprogramming.org
Sat Jun 8 13:43:33 CEST 2019
Op 2019-06-06 om 16:57 schreef Ben Grasset:
> On Wed, Jun 5, 2019 at 11:11 AM Sven Barth via fpc-devel
> <fpc-devel at lists.freepascal.org
> <mailto:fpc-devel at lists.freepascal.org>> wrote:
>
> You could try to adjust the FGL unit to use the pluggable sorting
> system introduced here:
> https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=41167
>
>
> Wouldn't that system itself need to be generic and not just use void
> pointers first? Or is that part of what you meant?
>
> IMO something FGL would benefit from also is the removal of the
> probably-not-the-best-design inheritance from non-generic TFPSList to
> everything else, which prevents inlining in a large number of places
> (the compiler notes indicating such are visible basically any time you
> use anything from FGL.)
>
Yes, but that would be incompatible. However maybe some simple object
based types next to it would furfill the remaining purpose of the unit (
cases where you need some simple generic container in places that
haven't access to the ones in packages (fcl-stl, rtl-generics)).
But I would keep it simple and straightforward, and save the complex
stuff for the more complicated libraries.
More information about the fpc-devel
mailing list