[Xotcl] "tie" command

Kristoffer Lawson setok at fishpool.com
Fri Jan 24 15:44:58 CET 2003


On Fri, 24 Jan 2003, Gustaf Neumann wrote:

>
>  we could provide an option -bind <varname> to the new instproc to allow
>  the user to specify a local or a per-object or global variable name, but
>  this does not provide reference counting at all. i have started some time ago

Oh, I meant to say that an option to [new] is not necessarily the best.
Often (at least in my case) it is a method of an object which creates
an instance and returns it, like:

set msg [$cmdReader getNewMessage]

So at the level where I want the automisation I don't directly call new.
Naturally this could be changed to accommodate the use of new, but then
my interface wouldn't be as cleanly split up.

This is why I thought of [tie] as a separate thing, not tied to [new].

Anyway, I don't know if it makes sense to add yet another automatic
destruction system, but it did pop into my mind when doing things like the
above :-)

                              / http://www.fishpool.com/~setok/





More information about the Xotcl mailing list