This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Alternate syntax for field access/method calls
- From: Chris Dean <ctdean at sokitomi dot com>
- To: Steve Yegge <steve dot yegge at gmail dot com>
- Cc: kawa at sources dot redhat dot com
- Date: Sun, 30 Jan 2005 19:03:05 -0800
- Subject: Re: Alternate syntax for field access/method calls
- References: <d494cb8f0501301443544697a2@mail.gmail.com>
Steve Yegge <steve.yegge@gmail.com> writes:
> I've been using the following pseudo-aliases:
>
> (define & invoke)
...
If you like this syntax, great! For me, I find it less-intuitive to
read when the function (or if you prefer, the verb) is not in the 0th
postion of an sexp. That is, this clearer to me:
(define-namespace jframe <javax.swing.JFrame>)
;; ...
(let ((frame (jframe:new "Kawa App")))
(jframe:get-content-pane frame))
than this:
(let ((frame :: <javax.swing.JFrame>
(new <javax.swing.JFrame> "Kawa App")))
(& frame 'getContentPane))
The first way also has the advantage of not requiring much type annotation
in the prgram.
My 2 cents.
Regards,
Chris Dean