|
From: Michalis K. <mic...@gm...> - 2011-08-10 18:27:40
|
Noah Silva wrote: > (I am kind-of hoping they escape the > only unit they are in now and become more common before I feel safe using > them everywhere). Current FPC in SVN has a little more generics usage, besides FGL unit: - there is fcl-stl package (with various containers designed similar to C++ STL). - inside Classes unit there is a define FPC_TESTGENERICS that makes some standard things use generics (TFPList, which in turn is used by many other containers, and TFPStrObjMap, which in turn is used by TStringList). I hope too that generics usage will spread more widely through FPC and Lazarus sources :) Anyway, they are already quite capable in my experience (in my engine, I use generics a lot --- 71 descendants of FGL.TFPGObjectList, 9 descendants of TFPGList, 56 descendants of my own TGenericStructList, and everything works nicely :) Previously I was using hand-made templates. Michalis |