[R6RS] Implicit naming for record procedures

Michael Sperber sperber
Mon Apr 25 09:10:28 EDT 2005

Marc Feeley <feeley at iro.umontreal.ca> writes:

> I side with Kent on this.  Implicit-naming means there is a standard
> naming convention for record accessors, and this makes it easier to
> find the accessor call sites (all you need to know is the name
> of the record type and the name of the field, you don't have to
> find the record definition).

Beyond avoiding additional typing, I don't see particular use in the
"standard" naming convention---the beauty of Scheme-style records is
that there's nothing in the use of the defined procedures that spells
out they are records, and hence I'm free to define them to something
else later.

Also, as always, the great thing about standards is that there are so
many to choose from.  The naming conventions of the Gambit's
DEFINE-TYPE, Gambit's DEFINE-STRUCTURE, the Chez-/PLT-style records,
the Scheme-48-style records, and the Olin-Shivers-style records are
all different.  The fact that Scheme 48 already had an implicit-naming
record facility (which has since been deprecated) didn't keep Olin
from adding a new one.  (And dropping it again later in favor of an
explicit-naming facility.)

None of this means that implicit naming is bad per se---it just means
that people tend to invent their own naming conventions even in the
face of existing ones.  I probably won't fight a form that chooses
implicit names as long as there's another one that doesn't, but it
makes me doubt the value of a "standard" one.

> I think that explicit naming should be supported also, but even this
> is not strictly necessary to reach your objective since you could
> also add comments, i.e.
> (define-type person ; make-person person?
>    birthday          ; person-birthday person-birthday-set!
>    sex               ; person-sex person-sex-set!
> )

The point of implicit naming isn't just "grep"---it's also that
all-too-often the names that I want aren't the ones implicit naming
would choose.

Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla

More information about the R6RS mailing list