[plt-scheme] SRFI-9 usability issues

From: Michael Sperber (sperber at informatik.uni-tuebingen.de)
Date: Thu Jan 15 15:44:31 EST 2004

>>>>> "Bradd" == Bradd W Szonye <bradd+plt at szonye.com> writes:

Bradd> The implementation of SRFI-9 (Defining Record Types) included with
Bradd> MzScheme uses make-struct-type to define the new type. It uses the
Bradd> default inspector, which means that the new record type is opaque.
Bradd> Because of that, the contents of a record can't be printed with DISPLAY
Bradd> or WRITE,

Right; I wrote this really early in the 200 cycle, and, as usual,
under severe time constraints (you've heard that tune before).  Also,
if I remember right, not all functionality related to printing, wasn't
quite operational at the time.

Bradd> and EQUAL? can't check two records for deep equality.

That I think would not be a good idea---

Bradd> SRFI-9 is silent on the issue of printing and comparing
Bradd> records,

Exactly.  For printing, it doesn't matter.  However, for comparing,
there's at least one other implementation (Scheme 48) that doesn't do
deep comparison.  (And, FWIW, Common Lisp doesn't either for DEFSTRUCT
and EQUAL.)  You implement this, people are going to use it, thus
creating non-portable code.

Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla

Posted on the users mailing list.