Generic Linked List for Delphi 2009

前端 未结 4 1283
南笙
南笙 2021-01-19 09:16

I was looking in Generics.Collections and noticed there was no linked list. Sure they are simple to make, but I thought it was odd there was not one (or I just missed it).

4条回答
  •  清酒与你
    2021-01-19 09:35

    I don't know of any generic, linked list in the existing Delphi RTL.

    They are still very useful as a data structure, however. Especially if you include variants on a linked list such as a b-tree or a binary tree. Unlike a regular list, a linked list can be expanded, edited, or modified without moving data in memory. They are very easy to version, and work well in purely functional code which does not allow mutating existing data. So it is still a very useful data structure.

提交回复
热议问题