Collections 1.1 is out

I’m proud to present version 1.1 of Collections package.



The major highlights of this release are:

  • TLinkedDictionary<TKey, TValue>, same as the standard dictionary but with predictable insertion order.
  • TLinkedStack<T>, same as standard set but with some predictability in element order.
  • TBitSet, a sorted set designed to store 16-bit numbers only.
  • TBidiDictionary<TKey, TValue>, a dictionary that enforces one key, one value on both ends.
  • TSortedBidiDictionary<TKey, TValue>, a sorted bidirectional dictionary.
  • TDoubleSortedDictionary<TKey, TValue>, a bidirectional dictionary sorted on both keys and values.
  • TSortedLinkedList<T>, a linked list with automated sorting.
  • RTTI based selectors. See overloads of Op.Select.
  • A rewrite of TLinkedList<T>, TLinkedQueue<T> and TLinkedStack<T>.
  • TArraySet<T> is not a sorted set and optimized a lot.
  • Multiple optimizations all over the place.
  • A new Op.GroupBy<T> operation.
  • Some internal cleanup.
  • Documentation fixes (Thanks Denisa once again).

On the project organization side, the project home page has got quite some love:

  • Three simplified diagrams of classes and interfaces in Collections.
  • A FAQ page that I hope will be useful to people. If you have a question not answered there please leave a comment and I will respond ASAP.
  • A page that states the differences between this project ans stock RTL collections.
  • A list with short descriptions for all Enex operations supported by collections.
  • A detailed “map” of all collections provided by the project with explanations of when to use, some implementation details and etc useful information that can help you better chose the collection you need.

On the documentation side of things, you will find two sample projects in the bundle. Only two at the moment, will add more when I have enough free time to.

Get the latest version or view the changelog!

13 Responses to 'Collections 1.1 is out'

  1. From the Enex operations page:

    Includes() — checks whether the original collection includes another given collection (element by element). Because associative collections do not usually specify a stable element order, an equality operation would be useless. A collection includes another if all elements in the given collection can be found in the original collection (not vice-versa).

    Then why not just implement equality as a.Includes(b) + a.count = b.count?

  2. BTW I really like the Select description. If I’m reading this right, is this basically equivalent to coll.where(element is class).op.cast?

  3. alex says:

    Then why not just implement equality as a.Includes(b) + a.count = b.count?

    I’m lazy I guess :)

    BTW I really like the Select description. If I’m reading this right, is this basically equivalent to coll.where(element is class).op.cast?

    Yes the class-only select acts like a where+cast. you can:

    for LSpec in LList.Op.Select do
    …. // you only get the TSpec<TSpec> (or inherited) objects.

  4. @Mason Wheeler
    Argh! Stupid HTML not liking <angle brackets>. Yes, I meant the class-only select.

  5. alex says:

    @Mason Wheeler
    Haha, had the same issue, edited :)

    Btw, this select was in DeHL since I think 0.7 … Bad documentation :)

  6. Marc Hoffmann says:

    Hi..

    Hmm..I can’t compile it under BDS2010:

    [DCC Fataler Fehler] Collections.Sets.pas(3777): F2084 Interner Fehler: URW2306

    Any idea??

    Thank you,
    Marc

  7. Markus Joos says:

    Hi Alex,
    In comparison to the DeHL collections your new spin off Collections for obvious reasons don’t support serialization via DeHL Serialization. Since I assume that you don’t want to update your collections classes in two different projects, I further assume that the DeHL collections will not get updated as frequently (if at all) compared to your new Collections project. So what’s your advice if I would like to use your Collections with serialization support?

    TIA
    Markus

    Btw: Still couldn’t get Help Insight to work :-(

  8. alex says:

    @Markus Joos
    My advice, stick with DeHL for a short while until I port some simplified serialization code over.

  9. alex says:

    @Marc Hoffmann
    Hi Marc,

    I’ll look into it when I get a few spare minutes. Thanks.

  10. David Taylor says:

    I recently started experimenting with your serialization framework in Collections and noticed that it is still a work in progress. Are you still actively developing the Collections and DeHL projects? I noticed there has been little activity in recent months and was hoping this did not mean you have lost interest.

    BTW thanks for all of the hard work you have put into these libraries. The are a real work of art!

  11. friendfinder says:

    This post is worth everyone’s attention. When can I find out
    more?

  12. I am in fact grateful to the owner of this website who has shared this wonderful piece of writing at at this time.

  13. Link exchange is nothing else but it is simply placing the other person’s blog link
    on your page at proper place and other person will also do similar in favor of you.

Leave a Reply to David Taylor Cancel reply

Your email address will not be published.