Object schizophrenia or self schizophrenia is a complication arising from delegation and related techniques in object-oriented programming, where self/this can refer to more than one object. By way of metaphor with the public confusion of dissociative identity disorder with the psychiatric diagnosis of schizophrenia, the former being associated with "split personalities," this configuration is called object schizophrenia or self schizophrenia in object-oriented programming.
Overview
An object can be defined as a computing concept combining data and behavior, and having an identity. In class-based programming, objects are built on class systems, where an object is an instance of a class. Classes can in turn be related by inheritance: a base class provides the fundamental or default behavior of an object, and acts as a template for creating objects, while a derived class can be used to override behaviors of a base class, and can be used as a template for objects whose behaviors refine those of the base class.
An alternative to classes and inheritance is prototypes...