TOM (object-oriented programming language)
Paradigm | object-oriented |
---|---|
First appeared | 1999 |
Stable release | 1.1.1 / October 15, 1999 |
Preview release | snapshots / April 14, 2001 |
License | GPL |
Filename extensions | .t |
Website |
gerbil |
Influenced by | |
Objective-C |
TOM was an object-oriented programming language developed in the 1990s that built on the lessons learned from Objective-C. The main purpose of TOM was to allow for "unplanned reuse" of code via a well-developed extension mechanism. This concept was introduced seemingly by accident in Objective-C and later proved to be of wide use, and was applied aggressively in TOM.
The primary changes in TOM are the addition of multiple inheritance, tuples as a first-class part of the language, cleaner syntax, free of the C requirements for header files and pre-compiler commands, and the ability to use categories (the re-use mechanism) to include anything.
It is this latter ability that represents "the whole idea". Unlike Objective-C's categories that allowed only new methods to be built onto existing classes, TOM allowed the addition of class and instance variables, new methods, even new superclasses. This results in the redefinition of "class" as "a class is defined by its main definition and any extensions", these extensions have become a first-class citizen of the language (similarly to Ruby).
The book The Pragmatic Programmer lists TOM as an example for a new language to learn.[1]
Development of the TOM language has ceased.
Hello World
This is the classic hello world program in TOM:[2]
implementation class HelloWorld
int
main Array argv
{
[[[stdio out] print "Hello, world!"] nl];
}
end;
implementation instance HelloWorld end;
External links
References
- ↑ Atwood, Jeff (2004-10-11). "A Pragmatic Quick Reference". codinghorror.com. Retrieved 2015-12-13.
Tired of C, C++, and Java? Try CLOS, Dylan, Eiffel, Objective C, Prolog, Smalltalk, or TOM.
- ↑ Schoenmakers, Pieter J. "The TOM Tome". gerbil.org. Programmers Without Deadlines.