[fpc-pascal] Lists of tuples
    Mark Morgan Lloyd 
    markMLl.fpc-pascal at telemetry.co.uk
       
    Mon Sep 22 13:34:12 CEST 2014
    
    
  
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]
    
    
More information about the fpc-pascal
mailing list