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: <dominique dot boucher at nuecho dot com>
- Cc: <kawa at sources dot redhat dot com>
- Date: Fri, 14 Jan 2005 16:50:56 -0800
- Subject: Re: Alternate syntax for field access/method calls
- References: <200501141911.j0EJBsKW027385@bergman.nuecho.ad>
"Dominique Boucher" <dominique.boucher@nuecho.com> writes:
> So I decided to extend the Scheme reader to support an alternate
> syntax for accessing fields and calling methods. With this new
> syntax, the example becomes:
>
> [someObject (method1) (method2 a b)]
Nice!
For myself, I use namespaces 99% of the time. So instead of:
> (invoke (invoke someObject 'method1) 'method2 a b)
I write:
(define-namespace class1 <com.merced.SomeClass>)
(define-namespace class2 <com.merced.SomeClass2>)
(class2:method2 (class1:method1 someObject) a b)
You can also do this if it's more convenient:
(com.merced.SomeClass2:method2 (com.merced.SomeClass:method1 someObject)
a b)
Regards,
Chris Dean