Re: Delphi 2008 (Tiburon) discussion



"Wayne Niddery [TeamB]" wrote
Bob Dawson wrote:

I was thinking of capitalizing on generics more. Certainly we could do
better than TCollection/TCollectionItem

As a general container class I've never got into using these, I've always
just used TList/TObjectList with my own various Item classes as needed.

I pretty much ignore TCollection as well--too many compromises in demanding
held item descent from TCollectionItem.

But rather than simple lists I'm generally I'm more interested in
Dictionaries. TStringList or a parallel TIntegerList are my normal
workhorses. In addition to a totally genericised TDictionary<Key, Value>
class I'd like Delphi to include string key and largeInt key versions.
There's no reason to force a key to always be a reference type when in
practice nearly all dictionaries are string or integer ordered. For a full
array we could have

TDictionary<Key : TClass; Value : TClass>
plus
TStringDictionary<Value : TClass>
TInt64Dictionary<Value : TClass>
TGUIDDictionary<Value : TClass>

bobD


.



Relevant Pages

  • Re: Delphi 2008 (Tiburon) discussion
    ... I was thinking of capitalizing on generics more. ... better than TCollection/TCollectionItem ... As a general container class I've never got into using these, ...
    (borland.public.delphi.non-technical)
  • Re: Delphi 2008 (Tiburon) discussion
    ... I was thinking of capitalizing on generics more. ... do better than TCollection/TCollectionItem ... As a general container class I've never got into using these, ... Useful articles about InterBase development: ...
    (borland.public.delphi.non-technical)
  • Re: Delphi 2008 (Tiburon) discussion
    ... Craig Stuntz [TeamB] wrote: ... I was thinking of capitalizing on generics more. ... could do better than TCollection/TCollectionItem ... As a general container class I've never got into using these, ...
    (borland.public.delphi.non-technical)