Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-09

Lists of tuples

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

Assuming that a tuple is a sequence of fields, accessible by position or name. Assuming that a list of tuples may significantly exceed available primary storage, and that individual tuples are accessed by some variation of First(), Next() etc.

As I understand it, this concept is central to the various database objects. Is it abstracted to a base class anywhere which can be used in other contexts without pulling in database-related libraries?

A trivial example of where this would be useful is manipulating a stream or file representing CSV data (e.g. from a potentially-large spreadsheet). Other examples include handling an array returned by a mathematical package (e.g. APL) where the input size is unknown, handling the results returned by a Prolog query applied to a large ruleset, and so on.

I'm not saying I need such a thing, and I accept that in many cases computers now have enough memory that a dynamic array is adequately efficient.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email