What happens if define-record-type is specified with two fields that have the same accessor identifiers provided for both fields? More generally, we need to say what happens when any two identifiers are non-unique.
This ticket deals specifically with the situation where two identifiers (accessors or mutators) of two field clauses in a define-record-type form are identical. This is not meant to address field names and what happens or what it means if the field names are symbolically equivalent but lexically distinct.
Why is this restricted to accessors when its title speaks of identifiers generally? Surely the same issue arises with conflicts between modifiers, or between an accessor and a modifier.
I have adjusted the language to allow for both accessors and mutators. What I wanted to distinguish was the issue where you want to bind two different procedures to the same name, and where you have two field names that were the same, which shouldn't cause a problem since they are not used anywhere.
where you have two field names that were the same, which shouldn't cause a problem since they are not used anywhere
This is JUST WRONG, and has been corrected repeatedly. Field names are used in the definition of a SRFI 9 constructor. Consider this:
(define-record-type :pare (kons x x) pare? (x kar set-kar!) (x kdr))Which argument of kons is identified with which field? Field types have to be distinct identifiers (not merely distinct symbols), though technically they don't have to be distinct from accessor/modifier names.
Okay, technically only the ones used in the constructor have to be distinct.
We voted to make this an error.
Field names have to be distinct, and so do mutator/accessor names.