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]

Re: define-simple-class first use comments


"Heineman, William P" <william_p_heineman@groton.pfizer.com> writes:

> 1. Field names can not have hyphens. Field names have to be java compatible.

This should now be fixed in CVS.  At the same time, I changed the
convention for name "mangling" - i.e. how Scheme names are mapped into
Java names.  Now, if a Scheme name is a valid Java name it is used as
is; otherwise a reversible mangling using "$" characters is used.
Thus the Scheme names '< and '$Leq are both mapped into the same Java
name "$Leq".  However, other names not containing "$" should no longer
clash, including pairs like "char-letter?" and "charLetter?"  and
"isCharLetter" which used to be all mapped to "isCharLetter".  Now
only names containing "$" can be ambiguous.

> 2. If for-each is used inside a method class fields are not accessible. I
> haven't tried it but I would guess that no lambda form enclosed inside a
> method would have access to the outer class closure. I solved my immediate
> problem by converting the for-each form to a do form.

Actually, it is supposed to work, and I don't know offhand why it
doesn't.  May be some simple litle bug.  If you write up a little test
case, perferably in a format suitable for adding to obj-test.scm, then
maybe I can take a look - when I have time for it!

Note that for-each using a lambda expression will often inline the for-each,
which may or may not be related to the bug.  I.e. ideally we want two
test cases:  One simple one where the lambda can get inlined; one where
the lambda cannot be inlined.  (One way to prevent inlining is to
pass the lambda function to some identity function.)
-- 
	--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]