This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
RE: instance?
- From: "Dominique Boucher" <dominique dot boucher at nuecho dot com>
- To: "'T. Dampier'" <dampier at mercedsystems dot com>, "'Chris Dean'" <ctdean at sokitomi dot com>
- Cc: "'Per Bothner'" <per at bothner dot com>, "'Kawa List'" <kawa at sources dot redhat dot com>
- Date: Mon, 23 Feb 2004 09:18:48 -0500
- Subject: RE: instance?
- Reply-to: <dominique dot boucher at nuecho dot com>
And why not simply 'foo?' ? It's more in the spirit of all other type
predicates, like symbol?, string?, etc.
Also, it would be really nice to be able to use the namespace in the
type declarations. Something along the line of
(define-namespace foo "class:some.java.class")
(define (a-function (arg :: foo))
...)
What do you think?
Dominique Boucher
> I'm of the same opinion -- but I'd recommend a more conventionally
> lexical symbol to the right of the colon. A form along the lines of
> (foo:instance? x) would seem more aesthetically well formed...
>
> TD
>
>
>
> Chris Dean writes:
> >
> > > It's in rewriteToInvocation in gnu/expr/InlineCalls.java.
> >
> > Thanks.
> >
> > > > I'd like to implement an alternate to `instance?' by creating a
`?'
> > > > method in a define-namespace alias.
> > >
> > > Hm. That is a bit of a hack. Note sure whether I like it or
not.
> >
> > Interesting. It seems very elegant to me. To my mind, it's
analogous
> > the the "new" method name.
> >
> > Regards,
> > Chris Dean
> >
Dominique Boucher