Quaject
   HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
, a quaject is an
object Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an a ...
-like
data structure In computer science, a data structure is a data organization and storage format that is usually chosen for Efficiency, efficient Data access, access to data. More precisely, a data structure is a collection of data values, the relationships amo ...
containing both data and code (or pointers to code), exposed as an interface in the form of '' callentries'', and can accept a list of callentries to other quajects for ''
callbacks In computer programming, a callback is a function that is stored as data (a reference) and designed to be called by another function often ''back'' to the original abstraction layer. A function that accepts a callback parameter may be design ...
'' and '' callouts''. They were developed by Alexia Massalin in 1989 for the ''
Synthesis kernel In computer science, self-modifying code (SMC or SMoC) is code that alters its own instructions while it is executing – usually to reduce the instruction path length and improve performance or simply to reduce otherwise repetitively simil ...
'', and named for the ''Qua! Machine'', a unique hardware platform built by Massalin. The origin of the term 'qua' is unclear; Massalin claims humorously that it is a sound made by
koala The koala (''Phascolarctos cinereus''), sometimes inaccurately called the koala bear, is an arboreal herbivorous marsupial native to Australia. It is the only Extant taxon, extant representative of the Family (biology), family ''Phascolar ...
s. The main purpose of quajects is to provide an
abstraction Abstraction is a process where general rules and concepts are derived from the use and classifying of specific examples, literal (reality, real or Abstract and concrete, concrete) signifiers, first principles, or other methods. "An abstraction" ...
to manage
self-modifying code In computer science, self-modifying code (SMC or SMoC) is source code, code that alters its own instruction (computer science), instructions while it is execution (computing), executing – usually to reduce the instruction path length and imp ...
, by allowing runtime code optimizing on a per-object basis. While the original Synthesis kernel required quajects to be written in hand-developed
assembly language In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
, this was done to avoid developing a complex compiler; Massalin noted that
just-in-time compilation In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is compilation (of computer code) during execution of a program (at run time) rather than before execution. This may consist of source code transl ...
(JIT) for a
high-level programming language A high-level programming language is a programming language with strong Abstraction (computer science), abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language ''elements'', be ea ...
that permits runtime code generation, as in
Lisp Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation. Originally specified in the late 1950s, ...
or
Smalltalk Smalltalk is a purely object oriented programming language (OOP) that was originally created in the 1970s for educational use, specifically for constructionist learning, but later found use in business. It was created at Xerox PARC by Learni ...
, can also apply this approach, though she also asserted that the complexity of such a compiler was likely to be prohibitive. Quajects differ from more conventional objects in two key ways: first, they always use a form of the
dependency injection In software engineering, dependency injection is a programming technique in which an object or function receives other objects or functions that it requires, as opposed to creating them internally. Dependency injection aims to separate the con ...
pattern to manage both interfaces to other quajects, and continuations out of the quaject; the list of callentry references for this is part of quaject creation, and may be updated during the quaject's lifetime. Second, and more critically, a given quaject's set of methods can be unique to the specific quaject; methods for a type or class of quajects are stored as one or more templates, rather than as fixed code. While shared methods can be accessed through a common table of pointers, individual quajects can also have methods that are generated specifically to tailor the performance for that quaject's behavior.


References

Operating system technology {{comp-sci-stub