This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home. For a version of this page that may be more recent, see ProceduralRecordsDownsides in WG2's repo for R7RS-large.


2010-03-13 19:32:21

From R. Kent Dybvig


I object to the procedural interface and prefer a syntactic interface for two reasons. First, the procedural interface is verbose, so that portable code that uses it either will be ugly or will have to carry with it the (possibly sizable) definition of a syntactic extension. Short snippets of expository code involving records either won't be short or, if they employ a syntactic extension without defining it, won't be well-specified.

Second, the procedural interface is difficult to compile efficiently because it is too unstructured and too general. The result will be that each implementation that bothers to try to generate good code will recognize only certain stylized uses (those produced by the local define-record-type syntactic extension), so that code won't be portable with any reasonable degree of efficiency. By standardizing on a syntactic construct, we stylize all code and introduce restrictions,

  1. g., that all accessors and mutators be created together, that will

allow even simple compilers to generate good code.