[Xotcl] XOTcl 0.9
Gustaf Neumann
neumann@wu-wien.ac.at
Mon, 15 Oct 2001 20:28:53 +0200
Fellow XOTcl community,
here comes the annoucemnt of XOTcl 0.9.
best regards
-gustaf neumann
.uwe zdun
==================================================================================
Announcing XOTcl 0.9
********************
WHAT IS XOTCL?
XOTcl is an object-oriented extension of Tcl that was derived from
OTcl. In short, XOTcl tries to provide a highly flexible,
reflective, component-based, and object-oriented environment. It
integrates language support for high level concepts which are not
found in other languages, with reasonable performance. It prevails
the Tcl programming style and the dynamic/introspective nature of
the language, rather than introducing other language's styles and
rigidness (such as C++) into Tcl.
RECENT CHANGES relative to 0.85 are:
- new functionality:
* Per object filters: in addition to traditional filters
(which are called now "instfilters") one can define now
filters per objects as well. XOTcl supports now
the following interceptors: per class filters and
mixins (called instfilters and instmixins),
and per object filters and mixins (called filters and
mixins).
* filterguards:
This is a new mechanism to specify when filters
should be applied (see tutorial and language reference).
* Namespace transparency for XOTcl procs and instprocs:
In previous releases, the programmer was responsible
to use :: prefixes in order to safely address Tcl commands
from XOTcl (e.g. an instance of a class defining
"set" had to use ::set). Now, the namespaces of Classes
and objects are ignored for command resolutions avoiding
potential interferences.
* Namespace on demand:
XOTcl objects allocate namespaces on demand
(e.g. when procs or child objects are defined).
* XOTcl is now a "well behaved" extension:
When libxotcl is loaded everything resides in
the ::xotcl namespace. Use "namespace import xotcl::*"
to import the global commands (xotclsh and xowish do
this per default).
* Improved parameter settings (see tutorial)
- Speed improvements:
* Significant speedup through the more consequent use
of Tcl_Objs for accessing classes and objects.
* Methods for append/lappend/array etc. are about 3 times
faster through the use of insttclcmd (see below)
* Parameter methods:
Methods for accessing parameters are now 4 to 5 times faster.
In the following example, "name" and "age" are parameters:
Class Person -parameter {{age 0} name}
Person p1 -age 99 -name gustaf
puts [p1 age]
setting and retrieving of parameters has now roughly the same
speed as the set methods
- Reduced memory consumption for objects and classes:
The size of XOTclObject structure went from 172 bytes
to 48 bytes by
* allocating assertion structures and namespaces on demand, and
* by and by omitting in the default setup metadata
10 thousand XOTcl objects consume now on a 32bit machine
about 2 MB of memory in total (including whatever Tcl needs
for commands etc)
- new Class methods
* instparametercmd: define a new getter/setter for instance
variables for instances of used class
* insttclcmd: evaluate an Tcl command in the context of an object
- new Object methods:
* parametercmd: define a new getter/setter for instance
variables for an object
* configure: method to call a series of methods on an object
e.g.
Object o1
o1 configure -set x 1 -set y 2
- new subcommands for info method:
* info methods:
returns procs, commands and mixins, accepts
modifiers: -noprocs, -nocmds, -nomixins
* info instfilters
* info filter
accepts new modifiers: -guards, -order
- fixes:
* propagation of return codes (e.g. ... return -code continue ...)
which is needed for Tk event maps
* various actiweb fixes (agent migration was broken)
* improved documentation
- Support for AOLserver:
XOTcl is now prepared for use in the AOL-server. The stubs for
AOL-server are integrated in XOTcl (many thanks to
Zoran Vasiljevic). The required patch for the AOL-Server
is available from http://media.wu-wien.ac.at/download.html#aol
- Stub-library support:
XOTcl supports now the stub library. This means that
it is less dependent on particular Tcl implementations.
The support was quite tricky since some commands used by XOTcl
(like Tcl_IncrObjCmd, Tcl_UpvarObjCmd, ...) are
not exported by the stub library, and the solution
has to work in the multithreaded AOL-server environment)
- potential incompatibilities:
* "[self] next" is gone, use "next" instead.
* The access of instance variables through the
tcl-set command is deprecated and works only
when the namespace is created. Instead of
Object o
set o::x 1
use
Object o
o set x 1
* procsearch returns a different format (see Changelog)
MORE INFO
General and more detailed information about XOTcl and its components
can be found at http://www.xotcl.org
Best regards,
Gustaf Neumann
Uwe Zdun