Quaject

Quaject

In object-oriented programming, an object is a structure that holds variables that define its state; operations, or methods, are then written to manipulate this data. In contrast, a quaject is a type of object that keeps a copy of its methods as part of its data load. The methods exist verbatim in the space of the object.

Because all the methods of an object are copied into it upon creation, a single pointer is enough to designate both the object and the desired method of that object to call. As the state of a quaject changes, it replaces the implementations of its methods with appropriate special cases. Alternatively, instead of supplying a callback function, the source quaject may simply install a copy of one of its methods into the callback slot of another quaject.

Quajects were first introduced by Henry Massalin in his PhD thesis describing a Unix-like kernel called Synthesis, written in the Motorola 68030 assembly language.

While no modern language uses the term "quaject" to describe its objects, many toy languages and scripting languages have quaject-like semantics, in which each object or actor carries with it scripts for all the actions it can perform. For one example, see Linden Scripting Language.

External links

* [http://citeseer.ist.psu.edu/massalin92synthesi.html Synthesis thesis]


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Self-modifying code — In computer science, self modifying code is code that alters its own instructions, intentionally or otherwise, while it is executing.Self modifying code is quite straightforward to write when using assembly language (taking into account the CPU… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”