[r6rs-discuss] [Formal] Record-type-length

AndrevanTonder andre at het.brown.edu
Fri Nov 3 10:41:49 EST 2006


---
This message is a formal comment which was submitted to formal-comment at r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Name        : Andre van Tonder
Email       : andre at het.brown.edu
Type        : enhancement
Priority    : minor
Component   : Records (inspection)
Version     : 5.91
Pages       : 72
Dependencies: None

Summary:
--------

A record-type-length procedure is suggested.

Description:
------------

An operation is requested that returns the valid range for the field index 
argument of the procedures "record-accessor", "record-mutator" and
"record-field-mutable".

Such a procedure would be convenient and useful for more efficiently writing 
operations that act on more than one record type.  One use case supported by 
record-type-length would be a "record-copy" procedure that can copy an 
arbitrary non-opaque record value with maximum efficiency.

Currently, although the length is indirectly available via
(record-type-field-names rtd), this is less convenient and may be 
slighly less efficient for the above kind of use case.

Suggestion:
----------

E.g.,

  (record-type-length rtd)





More information about the r6rs-discuss mailing list