Re: How does xotcl compare to ruby?
- From: "Donal K. Fellows" <donal.k.fellows@xxxxxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 11:10:42 +0100
GN wrote:
ok, this means, if an object has child objects, it does not copy it,
and the clone ooeration does not copy any object specific behavior. The
copy operation of XOTcl does both (including namespace, if necessary).
The XOTcl users would be quite unhappy, if it did not.
It copies object-specific methods (which are not procedures for various
reasons, though they use a common core with procedures and lambda terms)
but leaves the variables alone. Perhaps this should change; feedback
from the community will definitely help refine this part.
[discussion elided; I knew the UML concepts but not how they applied to XOTcl]No idea if that's part of what you call "deep copy" though.)
What you describe as "clone" does not appear to be deep or shallow
("no idea about sub-objects"). Btw, what does it exactly copy? The tip
as i have read it does not mention "clone" at all.
It's currently not a method at all (instead, it's an operation supported
through [oo::define]) but there is no copying of namespaces because it
is not at all clear what that means. Some things are mostly easy (e.g.
the copying of a procedure) but how do you copy a variable with traces
or a command that is implemented in C? When you've got sub-objects, is
it right to clone those or use some kind of reference so that they are
shared?
I don't have the answers to those questions, but given the complexity of
doing a total clone, I've decided to leave the copying of the namespace
to third-party code. That can define what behaviour it wants; I just
provide the support code that lets the object core be cloned. (And
thanks for explaining; you do far more than I attempt in this area.)
Is this a political statement about itcl or something substantial? The
differences between XOTcl and itcl are not a question of the API, but
about design. Some of he design concepts are quite contrary. Are there
any concepts specific to itcl part of what you have implemented?
It's a reflection of the fact that I don't remember. It happens. :-)
Will and I passed the design document back and forth quite a few times,
and working out who did what where when and why would now be a tricky
little research project.
However, I'd say that there are many more genes from XOTcl in my code
than there are from iTcl. The majority of differences are due to the
fact that we altered how objects are created and initialized; the XOTcl
way doesn't gel nicely with our other critical design goals, and a great
deal of things are consequent upon that (enough that we couldn't start
from the XOTcl code-base; I spent several months learning that).
The other thing I'd love some help with is the fine details of class
mixins in XOTcl. What is the use-case for the feature? Are class-mixins
designated by mixed in classes processed? (If so, how can you ground the
whole process?!) I ask because right now I've not implemented them on
the grounds that I don't understand them enough. :-)
Donal.
.
- References:
- How does xotcl compare to ruby?
- From: casioculture
- Re: How does xotcl compare to ruby?
- From: Larry W. Virden
- Re: How does xotcl compare to ruby?
- From: Donal K. Fellows
- Re: How does xotcl compare to ruby?
- From: GN
- Re: How does xotcl compare to ruby?
- From: Donal K. Fellows
- Re: How does xotcl compare to ruby?
- From: GN
- How does xotcl compare to ruby?
- Prev by Date: Tk: how to handle platform differences in keyboard autorepeat?
- Next by Date: Re: How does xotcl compare to ruby?
- Previous by thread: Re: How does xotcl compare to ruby?
- Next by thread: Re: How does xotcl compare to ruby?
- Index(es):
Relevant Pages
|