[R6RS] Records and Modules
dyb at cs.indiana.edu
Fri Jul 8 01:15:56 EDT 2005
> Do you all consider that there is no problem here? Do you all consider
> that it's not a problem to force users to write code such as?
> (module id lang
> (export rec-field1 rec-field1-set!
> rec-field100 rec-field100-set!
> (define-record rec field1 ... field100 ...))
In my records presentation at the Boston meeting, I proposed the following
syntax for dealing with this issue:
(co-export id co-id ...)
With this syntax, if id is exported, then so too are co-id .... If we
arrange for define-record to expand into its normal set of definitions
plus a co-export form, we can write:
(module id lang
(define-record rec field1 ... field100 ...))
I prefer this to making modules know directly about records. Of course,
co-export can be used explicitly or to build other abstractions.
I don't recall getting any feedback on this idea.
More information about the R6RS