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: invoke and mangling?


> I fixed this.  It now uses "manglenameIfNeeded", which uses the
> (mostly-) reversible mapping, and so this gives a run-time exception.

Hmm, I now think it should not use the reversible mapping that
manglenameIfNeeded uses.  Or perhaps it should be configurable with a
command line option.  It certainly works nicer with Java code if we use
the non-reversible mapping.

Consider the code below.  It certainly seems like invoke should work but
it doesn't because the method-a names mangle differently.  We could
mangle both names to "method$Mna", but I'd much rather mangle them both
to "methodA" so that Java callers could call the method using
conventional Java names and the Scheme callers can use conventional
Scheme names.

If you think this is a good idea, let me know and I'll send you a patch.

Regards,
Chris Dean


(define-simple-class <class-a> ()
  ((method-a) 'a))

(define (foo (x :: <class-a>))
  (invoke x 'method-a))


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