Have you used List<T>, Dictionary<K,V>, or IEnumerable<T> in C# much? How
about EventHandler<T>? They are pretty useful.

Even in Delphi, TList<T>, TObjectList<T>, and TCompare<T> are more than
handy IMO. No longer do I have to write "TMyObject(FList[I])" all over the
place. When using "if FList.IndexOf(Pointer(FInstance)) > 1" not only do you
need a typecast again, but you lose the ability to write or build in
TCompare<T>, for example to consider objects equal by comparing a specific
field.

Anyhow, I didn't mean this discussion to be about the merits of generics in
programming.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to