OTcl - MIT Object Tcl

The FAQ & Manual (Version 0.95, August 95)

David Wetherall
djw@lcs.mit.edu
MIT Lab for Computer Science

What is OTcl?

OTcl, short for MIT Object Tcl, is an extension to Tcl/Tk for object-oriented programming. It shouldn't be confused with the IXI Object Tcl extension by Dean Sheenan. (Sorry, but we both like the name and have been using it for a while.)

Some of OTcl's features as compared to alternatives are:

OTcl was presented at the Tcl/Tk Workshop '95. It constitutes a standalone release of a system that has been in use, embedded in the VuSystem, for two years. We made the release public (with free use, distribution and modification under the MIT license) to meet the demand for object-oriented programming in Tcl.

Where do I get it?

The primary distribution site for OTcl, including this FAQ and Manual, and documentation is:

ftp://ftp.tns.lcs.mit.edu/pub/otcl/

How do I make it?

OTcl compiles with Tcl 7.4 and Tk 4.0. Edit the Makefile as suggested (you probably only need to set your Tcl/Tk source code and library directories) and type "make". These objects should be built:

You can then try running the test.tcl script with otclsh or owish. It should report that several tests are passed.

The source is ANSI C, and should be relatively portable. Nothing is installed; I tried to keep the process simple, so that you can make your own shells with customized extensions or your own libraries in a predictable manner.

How do I use it?

There's a quickstart tutorial to help you become familiar with OTcl syntax and style. It's included in the distribution.

Tutorial

For documentation about objects, classes, and their capabilities, see the following reference pages. They're included in the distribution.

OTcl Objects
OTcl Classes

You can read further about OTcl's capabilities and design in the workshop paper, also included as part of the distribution. It provides a couple of terse examples too.

Extending Tcl for Dynamic Object-Oriented Programming
David Wetherall and Christopher J. Lindblad
Proceedings of the Tcl/Tk Workshop '95, Toronto, July 1995.

Feedback?

Let me (djw@lcs.mit.edu) know if you have suggestions or other feedback.