The well written design document of Interlisp-D's I/O streams and devices. In Interlisp a RECORD is a data type similar to the records of Pascal and structures of other languages. A DATATYPE is a record with a chunk of memory as the underlying representation, instead of a list structure like records.
@xentrac@amoroso Yeah, I wish too. I'm currently implementing (yet another) language; I'll think about whether that fits in with it.
Records themselves have often been considered synonymous with C and PL/I structs, but C at least is very fond of optimizing by messing with the internals of the layout of structs (or at least things that are 'obvious' are not guaranteed), in the name of speed or portability to long-gone architectures, but there are times other issues are more paramount.
For instance, often I want to read raw bytes from a file into a record, and have the file's layout be identical to that of the record in memory.
It is a nuisance, and more error prone (and slower) to have to actually do I/O (buffered of course) per struct field, or to read into a byte array and then memcpy to struct fields.
In my personal vocabulary I therefore call the thing a "record" if its layout is exactly what I say, as opposed to C with its different semantics.
But I am not aware of others who copy that usage. I rarely champion my internal habits.
Interlisp records can have a number of underlying representations such as lists, tagged lists, property lists, association lists, arrays, hash tables, and more. See the Interlisp Reference Manual on page 87 of the PDF:
CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.
@xentrac @amoroso
Yeah, I wish too. I'm currently implementing (yet another) language; I'll think about whether that fits in with it.
Records themselves have often been considered synonymous with C and PL/I structs, but C at least is very fond of optimizing by messing with the internals of the layout of structs (or at least things that are 'obvious' are not guaranteed), in the name of speed or portability to long-gone architectures, but there are times other issues are more paramount.
For instance, often I want to read raw bytes from a file into a record, and have the file's layout be identical to that of the record in memory.
It is a nuisance, and more error prone (and slower) to have to actually do I/O (buffered of course) per struct field, or to read into a byte array and then memcpy to struct fields.
In my personal vocabulary I therefore call the thing a "record" if its layout is exactly what I say, as opposed to C with its different semantics.
But I am not aware of others who copy that usage. I rarely champion my internal habits.