[Xotcl] Interested in OO for tcl.

Gustaf Neumann neumann at wu-wien.ac.at
Mon Dec 4 13:32:44 CET 2006

mail at xdobry.de schrieb:
> For OO-Beginners these XOTcl-Features might be not interesting:
> - method forwarding
> - filters
> - meta classes
> - slots
> - mixins
> - assertions, pre/post condition
> - non positional arguments
> - object aggregation
> I have ordered the features from most advenced to quite practical
> in my opionion.
> Although I have written many lines of XOTcl code I have rare used filters (only for debugging and IDE features) and never method forwarding.
> I have also never implemented my own meta class.
> Mixins can be practical to avoid big class hierarchies or in some special object lifecycle scenarios.
> But I need some times to figure out when to use mixins.
> Object aggregation is very usefull.


this is an interesting point of view. I have made often made the 
that - given the power of xotcl - beginners tend to "shoot with canons 
to sparrots"
(as we se in German). Using all language features for every tiny problem
is not necessarily the best approach.

Your list of what's important is certainly based on your experience and
your needs. It would be interesting to make a little program analyser
for arbitrary scripts, which outputs some basic metrics from
existing programs (starting with LOC, but as well #of classes,
methods, forwards, filters ...). This should
not be very complicated, the basic framework can be implemened
purely with mixins (for proc, instproc, class, superclass, forward, 
mixin, ...).
Sounds like a nice weekend project.

-gustaf neumann

More information about the Xotcl mailing list