Home

On Sat, 22 Sep 2007 02:44:35 -0700, Kay Schluehr wrote:

> I checked out Io once and I disliked it. I expected Io's prototype OO
> being just a more flexible variant of class based OO but Io couples a
> prototype very closely to its offspring. When A produces B and A.f is
> modified after production of B also B.f is modified. A controls the
> state of B during the whole lifetime of B. I think parents shall not
> do this, not in real life and also not in programming language
> semantics.

Well it's like Python: inherited slots (attributes) are looked up in the
ancestors. It should be easy to override `Object clone` in Io, so all
slots of the ancestor are shallow copied to the clone, but I guess this
might break existing code. At least for your own code you could introduce
a `realClone` slot.

Ciao,
Marc 'BlackJack' Rintsch

previous
next

Re: Adding a list of descriptors to a class
Re: IDLE path browser not recognizing my PYTHONPATH
Re: module confusion
Re: Construct On First Use Idiom example from FAQ
threads
Kidprotect
Rodzic Po Ludzku
Nasze Dzieci
Krwinka
Akogo