View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] Interested in OO for tcl.

From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Mon, 04 Dec 2006 13:32:44 +0100

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.
>

artur,

this is an interesting point of view. I have made often made the
observation
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