|
Feature | Toe | XOTcl | iTcl |
Language model or precursor | Java | OTcl | Tk |
Compilation required | No | Yes | Yes |
Class as an object template | Yes | No | Yes |
Class as an object | Yes | Yes | Yes |
Nested classes | Yes | Yes | No |
Abstract classes and methods | Yes | Yes | No |
Reusable interfaces | Yes | No | No |
Access protection (public/protected/private) | Yes | Yes | Yes |
Single inheritance | Yes | Yes | Yes |
Multiple inheritance | No | Yes | No |
Object ownership | Yes | No | No |
Garbage prevention | Yes | No | No |
Method Chaining ("next") | Yes | Yes | No |
Introspection services ("my", "self",...) | Yes | Yes | No |
Mixins | Yes | Yes | No |
Filters | Yes | Yes | No |
Cascaded filters | Yes | Yes | No |
Dynamic changes to classes and objects | Yes | Yes | Yes |
Object resetting/re-creation | Yes | Yes | No |
Copy/deep copy | Yes | Yes | No |
Implicit root class | No | Yes | Yes |
Method forwarding | No | Yes | No |
Comparative Limitations
The following list acknowledges that, relative to other OO systems, Toe has some limitations.
- Toe is intended to provide adequate performance. Initially implemented in pure Tcl,
it is unlikely to be competitive with a compiled library that provides similar capabilities.
However, no feature of Toe is platform-specific, and Toe should be as portable as Tcl.
- As a pure Tcl implementation, Toe is no more secure than the application code that uses it.
Its internal mechanisms may be undermined by inadvertent or clever programming.
However, Toe may be bundled into a Starkit or Freewrap application, making it as secure
as other Tcl code with which it might be bundled.
- The hybrid nature of Toe syntax may make its use confounding or stylistically
unappealing to individuals who prefer canonical Tcl.
[1],[2]
Toe also introduces some features that are not known to be available elsewhere.
However, programming within Toe should not disable or diminish any Tcl feature.
For those who prefer to program in, or have to be facile in, Java, C++, or some such,
using Toe to combine a familiar programming model with a versatile programming language
may have advantages in settings where mixed languages are the norm.
- Toe supports limited dynamic changes to running objects. This works against a strength
of Tcl, in which implementation changes can be made "on the fly."
However, an emphasis on designing stable structures is
necessarily at odds with making ad hoc changes that can alter a design.
- Toe only adds an enabling layer to Tcl for OO programming.
It does not provide class libraries, nor does it treat Tk widgets as anything special.
However, Toe is new; developing class libraries awaits community interest.
- Garbage prevention in Toe still allows a situation akin to the dangling pointer
problem in C/C++. A dynamic object may be removed, even as a variable retains the
command name for the deleted object.
However, as with other command-providing packages,
Tcl's "info command" can be used to validate object command names before they are invoked.
|
|
|