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 ticket #171

cc


    

changetime

2012-10-08 00:06:41

component

WG1 - Core

description

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.

id

171

keywords


    

milestone


    

owner

alexshinn

priority

major

reporter

arcfide

resolution

fixed

severity


    

status

closed

summary

Duplicate identifiers in define-record-type

time

2011-05-05 23:01:44

type

defect

Changes

Change at time 2012-10-08 00:06:41

author

cowan

field

comment

newvalue


    

oldvalue

10

raw-time

1349629601791391

ticket

171

time

2012-10-08 00:06:41

Change at time 2012-10-08 00:06:41

author

cowan

field

resolution

newvalue

fixed

oldvalue


    

raw-time

1349629601791391

ticket

171

time

2012-10-08 00:06:41

Change at time 2012-10-08 00:06:41

author

cowan

field

status

newvalue

closed

oldvalue

writing

raw-time

1349629601791391

ticket

171

time

2012-10-08 00:06:41

Change at time 2012-10-08 00:06:35

author

cowan

field

comment

newvalue

Field names have to be distinct, and so do mutator/accessor names.

oldvalue

9

raw-time

1349629595819938

ticket

171

time

2012-10-08 00:06:35

Change at time 2011-07-10 21:42:58

author

alexshinn

field

comment

newvalue


    

oldvalue

8

raw-time

1310308978000000

ticket

171

time

2011-07-10 21:42:58

Change at time 2011-07-10 21:42:58

author

alexshinn

field

status

newvalue

writing

oldvalue

decided

raw-time

1310308978000000

ticket

171

time

2011-07-10 21:42:58

Change at time 2011-07-10 21:41:04

author

alexshinn

field

comment

newvalue

We voted to make this an error.

oldvalue

7

raw-time

1310308864000000

ticket

171

time

2011-07-10 21:41:04

Change at time 2011-07-10 21:41:04

author

alexshinn

field

resolution

newvalue


    

oldvalue


    

raw-time

1310308864000000

ticket

171

time

2011-07-10 21:41:04

Change at time 2011-07-10 21:41:04

author

alexshinn

field

status

newvalue

decided

oldvalue

new

raw-time

1310308864000000

ticket

171

time

2011-07-10 21:41:04

Change at time 2011-05-06 04:38:29

author

cowan

field

comment

newvalue

Okay, technically only the ones used in the constructor have to be distinct.

oldvalue

6

raw-time

1304631509000000

ticket

171

time

2011-05-06 04:38:29

Change at time 2011-05-06 04:31:10

author

cowan

field

comment

newvalue

''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.

oldvalue

5

raw-time

1304631070000000

ticket

171

time

2011-05-06 04:31:10

Change at time 2011-05-06 04:14:36

author

arcfide

field

comment

newvalue

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.

oldvalue

4

raw-time

1304630076000000

ticket

171

time

2011-05-06 04:14:36

Change at time 2011-05-06 04:14:36

author

arcfide

field

description

newvalue

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.

oldvalue

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 accessors that are the exact same identifiers are used. 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.

raw-time

1304630076000000

ticket

171

time

2011-05-06 04:14:36

Change at time 2011-05-06 04:08:58

author

cowan

field

comment

newvalue

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.

oldvalue

3

raw-time

1304629738000000

ticket

171

time

2011-05-06 04:08:58

Change at time 2011-05-06 03:00:45

author

arcfide

field

comment

newvalue


    

oldvalue

2

raw-time

1304625645000000

ticket

171

time

2011-05-06 03:00:45

Change at time 2011-05-06 03:00:45

author

arcfide

field

description

newvalue

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 accessors that are the exact same identifiers are used. 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.

oldvalue

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.

raw-time

1304625645000000

ticket

171

time

2011-05-06 03:00:45

Change at time 2011-05-06 01:18:56

author

cowan

field

comment

newvalue


    

oldvalue

1

raw-time

1304619536000000

ticket

171

time

2011-05-06 01:18:56

Change at time 2011-05-06 01:18:56

author

cowan

field

description

newvalue

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.

oldvalue

What happens if `define-record-type` is specified with two fields that have the same `accessor` identifiers provided for both fields?

raw-time

1304619536000000

ticket

171

time

2011-05-06 01:18:56