Vanilla Object Orientation (VOO): A Value-Semantics Approach to Classes in Tcl

📅 2026-04-11
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the high overhead, poor memory efficiency, and complex destruction semantics inherent in traditional Tcl object systems such as TclOO and Itcl, which rely on external frameworks. The authors propose a lightweight object-oriented framework built exclusively on native Tcl lists and dictionaries, introducing for the first time in Tcl a pure value-based semantics for classes and objects. By leveraging copy-on-write mechanisms, the approach enables automatic memory management without requiring explicit destructors or additional runtime support. The design preserves standard Tcl calling conventions and offers a compatible migration path to C++. Experimental results demonstrate that, on Tcl 8.6.13 and 9.0, object creation is 7–18 times faster and memory efficiency improves by 4–6 times; the corresponding C++ implementation achieves 2.3–2.6 times faster field access and reduces memory consumption by 6.8–9.8 times.

Technology Category

Application Category

📝 Abstract
I present Vanilla Object Orientation (VOO), a framework that composes classes from Tcl's native data structures -- lists and dictionaries -- rather than introducing additional framework infrastructure. VOO objects are plain Tcl lists with automatic memory management through copy-on-write semantics, eliminating the destructor burden inherent in TclOO and Itcl. Benchmarks on Tcl 8.6.13 and Tcl 9.0 show VOO achieves 7--18x faster object creation and 4--6x superior memory efficiency compared to TclOO. A companion C++ migration path (VOO C++) further improves field-access speed (setter 2.3--2.6x faster) and memory (6.8--9.8x lighter than TclOO), while preserving an identical Tcl call-site API. Cross-version analysis confirms that VOO's compositional design scales better than framework-based approaches as the interpreter evolves.
Problem

Research questions and friction points this paper is trying to address.

Object Orientation
Tcl
Memory Efficiency
Performance
Value Semantics
Innovation

Methods, ideas, or system contributions that make the work stand out.

Vanilla Object Orientation
value semantics
copy-on-write
Tcl native data structures
memory efficiency
🔎 Similar Papers