Re: How does xotcl compare to ruby?



Donal K. Fellows schrieb:
GN wrote:
What is "object cloning"? is it like the copy method in xotcl (deep
copy) or something different?

Hmm, I'm not 100% sure how it differs. It creates a new object that is a
duplicate of the old one, but does not copy the underlying namespace,
mostly because there's no simple call to do that at the moment. (The
code has no idea about sub-objects, so naturally doesn't try to copy
them.

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.

No idea if that's part of what you call "deep copy" though.)

A "deep copy" is a "copy operation" where an object is copied with the
objects it contains. The notion, what "contains" means, differs from
the aggregation semantics (see e.g. the UML concepts association,
aggregation and composition) of the application and language.

A "shallow copy" is a "copy operation", where the contained objects of
the source are not
copied, but shared between the objects; this is the place where storage
management and
deletion semantics kick in, since when the source object is deleted,
the target object should
most likely not be affected. This requires reference counting and the
like.

Java for example contains a clone() operation that performs per default
(as defined on the most general superclass Object) a shallow copy. This
is highly related with javas garbage collection.

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.

What's from Snit and Incr Tcl?

Lots of design stuff. It's a while since Will Duquette and I designed
the API so I forget exactly which bits came from where.

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?

Donal.

.



Relevant Pages

  • Re: WinCE 5 - clone catalog item again - unable to do via PB ?
    ... "Paul G. Tobey " <p space tobey no spam AT no instrument no spam DOT ... Even if some of us occasionally do, some day tried to clone just a subtree as an example of good doing. ... In the Catalog, select the Catalog item you want to clone into your OS design and then, from the context menu, choose Add to OS Design. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Computed shortcut styles
    ... and dynamically created clone ... The reason I couldn't put clone into the same container is because containing element had "overflow: scroll;". ... Therefore, on "mousedown", I had to create a clone, insert it into a `document.body`, make it absolute, set its left/top to computed left/top of original element, and clone styles to prevent any visual side effects from element not being under the same cascade. ... I'm not very happy with that "solution", as it's not flexible; any changes in the thumbnails' design will require to modify script as well. ...
    (comp.lang.javascript)
  • Re: WinCE 5 - clone catalog item again - unable to do via PB ?
    ... for each item you're trying to clone. ... the needed source code under whatever tree it is). ... Create or open a workspace containing an OS design you want to modify. ... In the Catalog, select the Catalog item you want to clone into your OS ...
    (microsoft.public.windowsce.platbuilder)
  • Re: What is the difference in AR-15 brands?
    ... design anyone who wanted to clone the AR was free to do so. ... biggest diff is in fit and finish. ... Never had a single jam, ...
    (rec.guns)
  • Re: Proof: Intelligent Designer cannot be non-supernatural
    ... 'Design without a designer' IS evolution, ... tell us how it differs? ... I think he's talking about some kind of Rupert Sheldrake sort of thing, ... where there's an impersonal force pushing toward complexity. ...
    (talk.origins)