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.
Source for wiki TranslucentRecordsDownsides version 1
author
medernac
comment
ipnr
88.177.167.25
name
TranslucentRecordsDownsides
readonly
0
text
= From Jeff Dalton =
[http://groups.csail.mit.edu/mac/ftpdir/scheme-mail/HTML/rrrs-1996/msg00162.html Reference]
Perhaps I misunderstood what people meant by "opaque". I
thought it meant the fields of the record could be accessed
(and modified) only via the proper accessors (and mutators).
With a non-opaque record, OTOH, there would be some other
way to "look inside" (a metaphorical way of speaking that
I thought would fit with the metaphor behind "opaque").
For instance, maybe (record-length rec) tells me the number
of slots, (record-ref rec i) gives me the contents of the
i-th slot, and (record-set! rec i value) puts a new value
in the i-th slot. (At least that looks like the kind of
abstraction-breaking mechanism someone might object to.)
Now, in most cases no one is going to use record-ref and friends.
It's not like ADT implementations would normally use them all over
the place instead of calling the proper accessors (and mutators).
Nor would someone writing client code be likely to use them.
Neither of these things would happen except in fairly unusual
cases.
time
2010-03-13 19:20:08
version
1