a clarification and/or a small modification Matthias Felleisen 12 Jul 1999 18:01 UTC

Richard's record proposal is a huge step forward. Thanks!

I would like to raise one question:

  Why isn't define-record-type generative?

Suppose we have

  (begin
    (define-record-type :pare (kons x y) pare? (x kar) (y kdr))
    (define zzz (kons 1 2))
    (define-record-type :pare (kons x y) pare? (x kar) (y kdr))
    (kar zzz))

I would like to think the two record definitions introduce a disjoint class
of data, analogous to
  datatype a_record = ...
in ML rather than
  type a_record = ...
The proposal seems to say that the two introduce the same class of data.

Unless I am overlooing something, a simple change in the implementation of
DEFINE-RECORD-TYPE, namely,

  (gensym 'type)

in place of

  'type

should give us the natural degree of genericity. It should also allows us
to write DEFINE-RECORD-TYPE wherever we write DEFINE.

-- Matthias