This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: record field name mangling


Wen-Chun Ni wrote:
Seems we can't use names like foo-bar in a record. Take the example
of testsuite, if we use

(define complex (make-record-type "complex" '(re-value im-value)))
(define make-complex (record-constructor complex))
(define z (make-complex 3 4))

(z 're-value)
(z 'im-value)

It will bomb in kawa.lang.Record (line 53 in the current CVS version).
Is this a design constraint or a bug?
It's a bug.  I just checked in a patch.  Note that it would be
more efficient (as well as more portable) to use record-accessor
(assuming you save the result and re-use it).  Even better of
course is to use define-record-type, since that doesn't use
reflection (except for constructors, which is a performance bug).
--
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]