<html><body>
<p><tt>xotcl-bounces@alice.wu-wien.ac.at wrote on 03/17/2006 08:25:37 AM:<br>
<br>
> <br>
><br>
> A double-reference would solve this. In that way the handle returned <br>
> by [new] and [self] would always be a valid command for the object, <br>
> throughout its whole lifetime. If it is moved to be a child of <br>
> another object the handle remains the same (or at least can be used), <br>
> but the ownership is changed. Whether this is workable in XOTcl or <br>
> not is, of course, something you would be better at deciding.<br>
</tt><br>
<tt>I've been thinking along somewhat different lines, the classic "extra level of indirection" that solves all problems. What about using interpreter aliases as an indirection? What would happen if all objects were created as anonymous commands inside (say) the xotcl namespace, and the object name was just an alias to the anonymous object?</tt><br>
<br>
<tt>This would let move be straightforward, drop the old alias and create a new one. From what I've inferred of xotcl's implementation, I think xotcl would be (mostly) unaffected by the change. The one thing that I think might be busted would be is parent/child relationships. Rather than introspecting into the commands, you'd have to introspect the aliases (relationships would be inferred by alias location instead of command location). That might be difficult, Tcl aliases are surprisingly hard to introspect. </tt><br>
<br>
<tt>I also don't know what the performance implications would be (I think an alias introduces some overhead). But if objects didn't ever move, there might be some potential optimizations available too. </tt><br>
<br>
<tt>Just a thought...</tt><br>
<br>
<tt>        Scott</tt></body></html>