XOTcl
Extended OTcl - a dynamic object system for Tcl from Gustaf Neumann and Uwe Zdun, first described in 1999, that gave scripting per-object mixins, filters and runtime-mutable classes, helped inspire Tcl 8.6's built-in TclOO, and still ships as XOTcl 2 inside the Next Scripting Framework
Created by Gustaf Neumann and Uwe Zdun
XOTcl (Extended OTcl, which its authors pronounced “exotickle”) is an object-oriented extension of the Tcl scripting language. Gustaf Neumann and Uwe Zdun built it on top of MIT’s OTcl and first described it in 1999. Most object systems of the time only allowed classes and methods to be defined up front. In XOTcl, nearly everything could change while a program ran: which class an object belonged to, which classes were mixed into one object, and which methods sat in front of every call. The authors’ stated goal was language support for design patterns, so that a pattern could live in one place in the code instead of being spread across several classes.
XOTcl matters beyond its own user base. When the Tcl core team designed a built-in object system for Tcl 8.6, their proposal said it was “semantically inspired by XOTcl”. The language also still runs production software: the OpenACS web framework is built on it, and XOTcl 2 is maintained today inside the Next Scripting Framework.
History and origins
From OTcl to XOTcl
OTcl (“MIT Object Tcl”) was written by David Wetherall for the VuSystem project at MIT. It was a compact, dynamic object system that its maintainers said drew on CLOS, Smalltalk and Self, and later it was best known as the scripting layer of the ns network simulator. OTcl already let classes and objects be created, changed and destroyed at runtime, which is why Neumann and Zdun chose it as their starting point.
In May 1999, both authors were at the University of Essen, in Germany, when they presented XOTcl at the 5th USENIX Conference on Object-Oriented Technologies and Systems (COOTS ‘99) in San Diego. Their paper introduced filters, methods that intercept messages sent to an object, as a way to express design patterns. That summer, a second paper at the Nordic Workshop on Software Architecture described per-object mixins. By October 1999, the Essen homepage offered XOTcl 0.76 as a “preliminary version for evaluation”, available only as source code.
In February 2000, at the 7th USENIX Tcl/Tk Conference in Austin, the paper XOTcl - an Object-Oriented Scripting Language presented the full design. By then, Neumann was at the Vienna University of Economics and Business Administration (WU Wien), where the project has been based ever since.
Growing up
The 0.8x releases of 2000 added Windows and Linux binaries and a set of web components called ActiWeb. Version 1.0 was released on 8 November 2002. The 1.x line continued for over a decade, with 1.3 in 2004, 1.5 in 2006 and 1.6 in 2008, and ended with 1.6.8 in April 2014. Uwe Zdun’s name appears in the copyright notice for 1999 to 2007. Martin Matuska contributed during 2007 and 2008, and Stefan Sobernig has co-maintained the code since 2010.
Design philosophy
XOTcl follows Tcl’s own principles: everything is a command, everything can be inspected, and everything can be redefined. It applies them to objects.
- Classes are objects too. A class is an instance of a metaclass and can receive messages, be modified and be introspected like any other object.
- Everything is dynamic. Methods can be added or removed at any time, a class can gain or lose superclasses, and an existing object can change its class.
- Composition happens at runtime. Mixins and filters can be attached to a single object or to a whole class, and removed again later.
- Objects can describe themselves. The
infomethod reports an object’s class, mixins, filters, variables and methods.
Key features
Classes, methods and next
Methods are defined with instproc, and next calls the same-named method further along the method resolution order. The COOTS paper says next was “modeled after CLOS”. In this example, an existing object changes its class while the program runs:
| |
Per-object mixins
A mixin adds a class’s methods to an object, ahead of the object’s own class. A per-object mixin affects just one instance, so behaviour can be added to or removed from a single object without creating a subclass:
| |
Filters
A filter is a method that runs before every message an object receives, and decides whether to pass the message on with next. It can be registered on a class (instfilter) or on a single object (filter). Filters make patterns such as tracing, access control or adapters possible without editing the methods they wrap:
| |
Run against NSF 2.4.0, this prints two lines, not one, because the filter also catches the lappend message that push sends to its own object:
| |
Assertions
XOTcl 1 added assertions for design by contract: pre- and post-conditions on methods and invariants on classes, which can be switched on for each object with check:
| |
The original feature list also included nested classes, dynamic object aggregation through Tcl namespaces, and metadata for self-documenting code.
Evolution: XOTcl 2 and NX
At the end of the 2000s, Neumann and Sobernig split XOTcl into two layers. The lower layer is the Next Scripting Framework (NSF), a C library that provides the machinery for object systems: method dispatch, mixins, filters and argument checking. It can host several object systems in one Tcl interpreter. On top of it, the object systems themselves are written entirely in Tcl. NSF ships with:
- XOTcl 2, which reproduces XOTcl 1 closely enough that, according to the project’s migration guide, most existing XOTcl 1 programs run without changes.
- NX, the Next Scripting Language, which the project describes as a successor to XOTcl based on “10 years of experience with XOTcl in projects containing several hundred thousand lines of code”. NX uses more mainstream terms, has fewer predefined methods and puts more weight on explicit interfaces.
| |
The first NSF beta was tagged in October 2011. The first stable release, 2.0.0, came in late 2014, followed by 2.1.0 (2016), 2.2.0 (2018), 2.3.0 (2019) and 2.4.0 (August 2022). NSF is released under the MIT license. A 2.5.0 release, which completes support for Tcl 9, was prepared in the summer of 2026 (version bump in July, draft announcement in August) but had not been tagged as of September 2026.
Influence on Tcl itself
For years Tcl had no built-in object system. Programmers instead chose among extensions such as [incr Tcl], OTcl, XOTcl, stooop and Snit. TIP 257, created in September 2005 by Donal Fellows and co-authors, proposed adding object-oriented support to the Tcl core that would be “semantically inspired by XOTcl”, and was designed so that other object systems could be built on top of it. The result, TclOO, was merged in 2008 and has shipped with every Tcl release since 8.6.0 (December 2012). TclOO’s mixins, filters and next-based method chaining closely resemble their XOTcl counterparts, reflecting that stated inspiration. A competing proposal from Neumann, TIP 279, suggested a minimal core for hosting multiple object systems. It was never adopted into Tcl, but its central idea became the basis of NSF.
Current relevance
Treat XOTcl as two things:
- XOTcl 1, the standalone distribution, is dormant. Its last release was 1.6.8, in 2014.
- XOTcl 2 is maintained. It is part of every NSF release, NSF was still receiving commits in September 2026, and Debian packages NSF 2.4.0. Its largest user community is OpenACS, whose xotcl-core and xowiki packages were still receiving commits in 2026.
Beyond OpenACS, XOTcl is a niche language. There is no official Docker image; the only one found is a small community image bundling NSF 2.4.0.
Why it matters
XOTcl showed that a scripting language’s object system could go well beyond classes and inheritance. It added per-object mixins, message filters and runtime class changes, and it made them practical tools rather than research topics. That work had two lasting effects. Through TIP 257 it helped shape the object system built into every copy of Tcl since 8.6. Through OpenACS and Learn@WU it has run large production web systems since at least the mid-2000s. And more than 27 years after the COOTS paper, Gustaf Neumann is still committing to the codebase that carries it.
Timeline
Notable Uses & Legacy
OpenACS
The xotcl-core package, first checked in by Gustaf Neumann in October 2005, provides the XOTcl layer that many OpenACS packages build on, including the xowiki content system. The openacs.org community wiki runs on xowiki, and both repositories still received commits in 2026
Learn@WU
The e-learning platform of the Vienna University of Economics and Business was launched in fall 2001 on OpenACS and dotLRN. Neumann and Peter Alberer's May 2005 slides state that most newly developed Learn@WU components were implemented in XOTcl, including the objects that give access to course community data
next-scripting.org
The Next Scripting Framework's own website runs on OpenACS and xowiki, and so on XOTcl-based code
ActiWeb
A set of web components in XOTcl distributed with the language from 2000: an HTTP/1.0 and 1.1 server and client (xoComm), an XML/RDF parser (xoXML/xoRDF), a persistent store (xoStore), and mobile and active web object systems (xoMOS, xoAWO)
XOTclIDE / TclSqueak
A Smalltalk-inspired integrated development environment for XOTcl and Tcl, with code browsing, introspection, debugging and version control. It tracked XOTcl 1.6 (version 0.83, 2008) and XOTcl 2.0 (0.85, 2012), and was renamed TclSqueak at version 0.90 in June 2015
Language Influence
Influenced By
Influenced
Running Today
Run examples using the official Docker image:
docker pull michaelfeurstein/simplynx:latestExample usage:
docker run --rm -v $(pwd):/usr/local/scripts michaelfeurstein/simplynx:latest /usr/local/scripts/hello.tcl