From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17811 invoked by alias); 5 May 2018 00:52:17 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 17802 invoked by uid 89); 5 May 2018 00:52:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: aibo.runbox.com Received: from aibo.runbox.com (HELO aibo.runbox.com) (91.220.196.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 05 May 2018 00:52:14 +0000 Received: from [10.9.9.211] (helo=mailfront11.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1fElQp-00079m-FL; Sat, 05 May 2018 02:52:11 +0200 Received: from 70-36-239-190.dsl.dynamic.fusionbroadband.com ([70.36.239.190] helo=localhost.localdomain) by mailfront11.runbox.com with esmtpsa (uid:757155 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1fElQZ-0003G6-0n; Sat, 05 May 2018 02:51:55 +0200 Subject: Re: Notations for calling Java methods To: Duncan Mak , kawa mailing list References: From: Per Bothner Message-ID: Date: Sat, 05 May 2018 00:52:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-q2/txt/msg00008.txt.bz2 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/