Re: OO and dynamic classes and methods...

From: <hasty_at_netcom.com>
Date: Fri, 03 Feb 95 10:55:34 -0800

>
> > Is it possible to re-define a class and then have the respective
> > instances reflect the new definition?

> No it is not possible and the design of STklos was explicitely done to avoid
> this. CLOS permits this but it conduct to weird situations:

> 1. it implies that classes are not real "first class" object (in CLOS
> you have to say (make-instance 'the-class), note the quote which
> in fact permits to designate an entry in a hash table which permits
> to find the structure of the object...
> I found this was more schemish

> 2. it costs a lot since a class must know all its instances and have a
> link over them

> 3. it complicates the semantics of slots redefinition. When you add
> or delete a slot, things are relatively clear but when you change
> some of its properties (such as its initform -- not too complicate, or
> its allocation -- more complex) things are more difficult to understand
>
> 4. Most of the time, it is convenient only when develooping an
> application (it is rare that the class of an object change> during
> its execution). My guess was that it would be faster to have a
> simplist system where you reload things when you see that you have
> a slot which is missing or no more useful, rather than having an
> "intelligent" system where you have to pay an overhead even if you don'
t
> use this feature (cause of 2, principally).
> to reload all than

> I hope I have convinced you of the usefulness of this feature :)

Sorry Erik but you don't convice me at least for my case.
This is my scenario:

First and foremost we should try to make application development
as easy as possible.

I want to develop a spread sheet application development environment
which is probably closer in concept to a GUI/application environment.
The user should have the capability of changing classes and methods
dynamically. One of the existing problems with window applications
is their inflexible approach that they offer to the user.
I believe that a user/developer should have the capability of
changing the behavior of the programs. Besides, in a dynamic
changing environment is kind of hard to rely on a static
inheritance mechanism. As for the performance issue,
if the user or application does not require dynamic inheritance
then it should be possible to disable the feature.

I really would like to understand this issue of dynamic
inheritance vs. static inheritance specially if new languages
such as Self, Dylan, etc... are incorporating dynamic inheritance
into their language. For those not familiar with this issue,
a couple of papers argue for dynamic inheritance:
self.stanford.edu:/pub/papers/inheritance.ps.Z
                              organizing.ps.Z


        Regards,
        Amancio
Received on Fri Feb 03 1995 - 20:11:09 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST