This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: instance?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]