Version 15 of Object

Updated 2023-10-12 10:53:27 by pooryorick

object is perhaps the most overloaded word in computing, with the common denominator being the idea that an object is a concrete instance of some type of thing in the context of some larger system.

Description

At the machine level, a region of memory exposed to a program is called an object, and assembly programs express operations directly on these regions. At the next level up, languages like C express operations on values and their locations in memory, but also express a type for each value such as "character", "integer", "float", and "array", and constrain operations on the basis of these types. In The C Programming Language, the first use of the term "object" is in reference to these primitive types. At this level, the concept of class also begins to arise, with the various numeric types having a certain degree of compatibility with each other.

In the context of compiling source code to machine code, C, an object is an instance of a compiled unit of source code. From this meaning comes the term, shared object, also called a dynamic link library, which is a compiled code object that can be linked into a program at runtime.

In object-oriented programming, which refers to a set of programming language features which divide the state of a program up into discrete units, where a particular set of procedures are responsible for collaborating to manipulate a discrete unit of state, an object represents the association of a unit of state with the set of procedures responsible for managing it. Each unit of state is composed of data elements representing some structure or entity, and the procedures associated with it provide an interface for interoperating with that those data elements. Typically, each object is either instantiated from classes or cloned from prototypes. Because of the close relationship between a functional task in a program and the real-world objects that a program models, object-oriented programming features are often also used to organize code according to model function. Because the organization of code units needed to implement the model does not necessarily conform the organization of objects in the model, there an impedence mismatch may occur when a programmer attempts to use object-oriented programming to align the organization of program code units with the organization of model objects.

In Tcl, at the implementation level Tcl_Obj is a data structure that is used to implement Tcl values.

See Also

Object Orientation
Wikipedia