[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: records all have same internal-name

This page is part of the web mail archives of SRFI 57 from before July 7th, 2015. The new archives for SRFI 57 contain all messages, not just those from before July 7th, 2015.



Andre van Tonder wrote:

On Sun, 19 Dec 2004, Per Bothner wrote:

I'm trying to get the srfi-57 implementation through the
Kawa implementation.  One issue is the invocation of
srfi-9:define-record-type always creates a primitive
record type named "internal-name".

It looks that way in the code, but if srfi-9:define-record-type binds internal-name to something using define as in the srfi-9 reference implementation, and if define is treated as a binding form by syntax-rules, internal-name will be a new hygienically generated identifier.

SFI-9 only defines define-record-type at top-level.  The SRFI-9
reference implementation is not "declarative" - it maps a
compile-time-visible define-record-type to calls to a run-time
functions.  That does not how I want my implementation to be,
so instead of the referece implmentation I some simple macros
that translate define-record-type to the Kawa special form
define-simple-class.

I am also getting a *lot* of srfi-9:define-record-types
created - 389 classes generated (at run-time rather than
compile-time) for the trivial 'point' example.
I'm hoping these are due to bugs in Kawa's macro
expansion:

This does sound like a bug.  Only one should be created.

I kind of assumed that, and hope that fixing this bug may improve
the performance situation as well.
--
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/