This is the mail archive of the kawa@sourceware.cygnus.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]

Re: Kawa Servlets


Per Bothner wrote:

> For one thing, you would be restricted to having to 
>define the methods
> as the same time (same module) as the class.  This 
> is a *major*
> restriction, since you won't be able to have the 
> first argument be
> a standard (pre-defined) clas.

I'd be willing to wear that, but I can think of ways around it. Like you
could modify existing .class files in place. (Hey, I never said it would
be easy :-).
 
> Note that building dispatch tables has to be done at 
> "link time",
> not compile time, and re-built when a new method is 
> added to a generic
> functions.

Yeah but Java doesn't have a link time, or rather link-time and run-time
happen at the same time.

> > More than one object system sounds like a bit of a problem to me.
> 
> Well, this is quite in the spirit of CLOS, with its 
> meta-class and MOP.

I'm not expert on MOP, but even using MOP different objects still
interact as part of the same OO system. e.g. you can multiple inherit
from different objects even when they use different MOP customisations.
 
> > The thing is "invoke" is not scheme. You don't write
> > (invoke string-append foo bar) for example.
> 
> You do write (apply foo ...).  

You do when you don't know in advance the number of arguments to pass to
foo. You don't when you know the number of arguments which is the usual
case. One doesn't want every second line of code to look like (invoke
...

>The thing is:  What syntax *would* you
> use in Scheme?  I gather the answer is generic functions.  One reason
> I'm nervous about them is primarily name-space management.  Having
> every method named "foo" in every class all be part of the same "foo"
> generic function is rather scary.

I admit it sounds scary, but that is how CLOS works no? For myself, more
familiar with C++ and such the CLOS way is hard to get my head around,
but I think that is just the way it's supposed to be. Can you see any
semantic problem here?

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