AW: [Xotcl] destroy invoked by object move?
Koen Danckaert
koen at retarget.com
Mon Mar 27 18:33:04 CEST 2006
> haveing listed these options, "::xotcl::mycmd" looks reasonale
> to me, since it constructs a tcl command and avoids the "[self]"
> in a similar way as "::xotcl::my".
I agree with this. "myvar" and "mymethod" are at the same level as "my", which has the advantage that there is a clear semantical distinction from "my". E.g. an easy explanation in a tutorial would be:
"my foo args" calls a method on the current object, "mycmd foo args" constructs the same command as a list but does not execute it.
This is more difficult to explain for the methodname variant, since it is clear that "my cmd foo args" actually _does_ execute a method.
The argument that "myvar/mycmd" can only be used for the current object, also holds for "my". In that case you have to use the non-shorthand notation.
Concerning the choice between myproc/mymethod/mycmd/mycode/... that I'll leave up to Gustaf ;-)
Koen
More information about the Xotcl
mailing list