AW: [Xotcl] destroy invoked by object move?

Scott Gargash scottg at atc.creative.com
Tue Mar 21 02:54:38 CET 2006






xotcl-bounces at alice.wu-wien.ac.at wrote on 03/20/2006 12:29:57 PM:

>
> On 20 Mar 2006, at 18:13, Koen Danckaert wrote:
>
> >>>> I have added "::xotcl::mymethod" and "::xotcl::myvar" to my
> >>>> development version. i guess, you would you prefer to have
> >>>> these exported. Opinions?
> >>>
> >>> On giving it some thought I think I actually prefer the version
> >>> that  would be part of Object. After all, it is that object's
> >>> variable that  we want.

I also think it should be methods. An object owns its methods/variables, you should have to ask the
object for a reference.  Just reach in from outside and grabbing a reference feels...rude.

Asking the object also gives it a chance to overload it.  I can't imagine why, but an object might
want to know that something has a reference to its internal state.

> It's only really necessary for variables which are linked to other
> systems as for callbacks you can generally do f.ex.:
>
> after 100 [list [self] doStuff]
>
> which is what I actually do. I mean, presumably the problem with
> using a method by its direct namespace is also that filters get
> avoided, or? (at least I think it was that way at some point in
> XOTcl's history). That, to me, would mean it's not a good method
> except for very specific cases.

I would expect that [list [self] dostuff] is what [my &method doStuff] returns.  Isn't that the
desired behavior to return a list that when evaluated acts as though you have invoked the method on
the object?

At least, that's what snit does with "mymethod".  Although snit doesn't have nearly the same design
space as XOTcl, so maybe it's not comparable.

      Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://alice.wu-wien.ac.at/pipermail/xotcl/attachments/20060320/e293e383/attachment-0001.html


More information about the Xotcl mailing list