Graeme Geldenhuys schrieb: > On Thu, Nov 20, 2008 at 4:10 PM, Aleksa Todorovic <[EMAIL PROTECTED]> wrote: >> Or... it could be implemented using generics, so one can choose: >> >> TStringList<UnicodeString> >> TStringList<AnsiString> >> TStringList<ShortString> >> >> (sorry for C++ish syntax, but I hope you understand) > > > I somehow managed to skip the whole generics thing and have no clue > how they work, but I will give it a once over before I start the > TStrings and TStringList implementations. Maybe I can hit two birds > with one stone. :-)
See http://svn.freepascal.org/svn/fpc/trunk/rtl/objpas/fgl.pp The trick is to have an type independend core class and a type aware wrapper. This keeps the executable size low even with a lot of specializations. _______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
