[R6RS] Implicit naming for record procedures [was: Internal DEFINE vs. macros]

Marc Feeley feeley
Mon Apr 25 07:40:20 EDT 2005


On 25-Apr-05, at 4:12 AM, Michael Sperber wrote:
>>
>> While I prefer the naming regularity inherent in the implicit name
>> generation, it's fine with me if we allow the names of the 
>> constructor,
>> predicate, accessors, and setters to be specified explicitly as long 
>> as
>> I have the option of having them implicitly generated.  Can we agree
>> on that?
>
> Probably.  Moreover, it seems easy to build the implicit-naming
> facility on top of the explicit-naming facility.  It's doable but
> harder and much more annoying to do the reverse.  (I've done that in
> various forms for PLT Scheme.)  I would like to avoid a Common-Lispish
> megalomaniac one-size-fits all form with a zillion options.  (Plus, a
> different name might let me grep specifically for occurrences of "your
> form" :-)

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).  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!
)

Marc



More information about the R6RS mailing list