This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: SRFI 9 and macro for record definition
- From: Jocelyn Paine <popx at ifs dot org dot uk>
- To: kawa at sources dot redhat dot com
- Date: Thu, 21 Nov 2002 17:20:10 +0000 (GMT)
- Subject: Re: SRFI 9 and macro for record definition
In a mailing on 18 Oct 2001, Per replied to Stan Pinte, who had asked for
a macro built on top of make-record-type for defining records by passing
it the name of the record type and slots:
> First, I recommend against make-record-type and related functions, if
> you can conveniently use one of the alternatives, because they create
> new classes at run-time, and require runtime reflection. That is why I
> would not accept any addtion to Kawa that depends on make-record-type.
> My preference is to build on define-class syntax. ...
> What I would like is to add an implementation of SRFI 9 "Defining Record
> Types" (http://srfi.schemers.org/srfi-9/srfi-9.html). This can be
> implemented on top of make-record-type fairly easily (the SRFI 9
> document provides an implementation), though it would be better to
> define it using define-class. That should not be very difficult
Per, did you or anyone else implement this? As with my last posting, I'm
thinking about portability to other Schemes. If I could avoid giving users
of my code the chore of changing all the "define-class"s and "slot-ref"s
to something their Scheme understands, and could instead use a means
of defining records that they can execute without change (but which is
still efficient for me in Kawa) that would be good.
Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091