From: Per Bothner <per@bothner.com>
To: Duncan Mak <duncanmak@gmail.com>,
kawa mailing list <kawa@sourceware.org>
Subject: Re: Notations for calling Java methods
Date: Sat, 05 May 2018 00:52:00 -0000 [thread overview]
Message-ID: <f18b1e37-a132-c423-3798-cfa7108e0229@bothner.com> (raw)
In-Reply-To: <CABgWrqrO=WizKba4RH_ncs6wwPg23mPB9Jp1WDhCVGDiFL0RDg@mail.gmail.com>
On 05/04/2018 11:34 AM, Duncan Mak wrote:
> I was doing some reading on the various Scheme implementations on the JVM
> and saw that both JScheme and SISC and of course Kawa have their own way to
> reference Java fields/methods.
> ...
> I was wondering if you could say more about the variously notations, and
> their pros and cons - is there a reason why Kawa did not adopt the Javadot
> notation?
It's been so long ...
I was never fond of javadot notation - it seemed a bit ad hoc - not to say ugly.
The "colon notation" was relatively late - there were various earlier notations,
including a variation of colon notation with special "magic" (ugly ...) characters:
(*:method-name instance argument ...)
as opposed to the now-preferred form:
(instance:method-name argument ...)
Looks like the "colon notation" as a separate section of the manual is from 2011,
but I believe the implementation is older than that: The class GetNamedPart (used
to represent colon notation) is from 2005.
> Also, I saw that Silk has another technique (
> http://www.cs.brandeis.edu/~tim/Papers/Reflection99/Old/paper2.html), and
> what do you think about that?
I'm leary of Silk's (import CLASSNAME). It defines imported methods as generic functions,
which seems a bit dangerous and prone to mysterious name clashes.
Note also that a key goal of Kawa is to support efficient compilation: you generally
don't want to use reflection. Instead Kawa tries to compile to bytecode similar
to what javac would emit.
--
--Per Bothner
per@bothner.com http://per.bothner.com/
prev parent reply other threads:[~2018-05-05 0:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-04 18:34 Duncan Mak
2018-05-05 0:52 ` Per Bothner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f18b1e37-a132-c423-3798-cfa7108e0229@bothner.com \
--to=per@bothner.com \
--cc=duncanmak@gmail.com \
--cc=kawa@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).