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]

Re: prototype object semantics


John Kozak wrote:

>Question: morphic is very objecty, but works best with prototype
> rather than class based semantics.  Just looking very superficially,
>it seems prototypes could be embedded into the kawa class universe
>reasonably cleanly: e.g. perhaps have a class called <PrototypeRoot>
>which has methods 
>  (add-slot!   (name :: <java.lang.string>))
>  (add-method! (name :: <java.lang.string>) code) ;; need this?
>  (clone)
>create a single object of <PrototypeRoot>, then all new prototype
>semantics objects just clone and modify recursively off this.  Is this
>a demented idea?
>
Well, the Kawa class universe is rather tied to classes that have
slts and methdos known at compile-time.  Of course compile-time
can also be run-time in Kawa.

I guess you could re-define various Kawa primitives to call some a
special interface method if an object implements PrototypeRoot,
and call reflection otherwise.  Or vice versa.

    --Per Bothner




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