Objects



next up previous contents index
Next: The Theta Type Up: Overview of the Previous: Overview of the

Objects

Theta programs run in a universe of objects. Each object in the universe has a unique identity, an encapsulated state, and a set of methods that can be called to interact with it. Objects belong to types that define the names and signatures of their methods.

Theta provides a rich set of built-in types, and users can define new, abstract types. Users can also define new routines. Methods and routines can be either procedures or iterators, and when called may either terminate normally or by signaling an exception. Both types and routines can be parameterized on one or more parameter types.

Objects come into existence as a result of calls to certain methods and routines that create new objects. Storage for objects that can no longer be accessed is reclaimed automatically by the garbage collector.



theta-questions@lcs.mit.edu