Prototype

From Organic Design
Jump to: navigation, search
Glossary.svg This page describes a concept which is part of our glossary
Prototype-based programming is a style of object-oriented programming in which classes are not present, and behaviour reuse (known as inheritance in class-based languages) is performed via a process of cloning existing objects that serve as prototypes. This model can also be known as classless, prototype-oriented or instance-based programming. Delegation is the language feature that supports prototype-based programming.

The original, and most canonical, example of a prototype-based language is the programming language Self. Since the late 1990s, the classless programming style has grown increasingly popular, and has been adopted for the languages JavaScript, ActionScript, Cecil, NewtonScript, Io, MOO, REBOL, Lisaac, Lua and several others.

Prototype / Archetype

The Nodal Model combines these two concepts, since instances are based on prototypes, but the prototypes evolve over time from feedback from the instances "in the field". This is a tangled hierarchy where each is based on the other, but as with all such "paradoxes" found in such systems they are resolved by each direction of influence operating on a different scale of time - i.e. local instances maintain a dynamic real-time relationship with the global prototype which changes very slowly as the information from many instances is collated and assessed.

See also

Animal instances.png Cups.png
Shell generative function.png Shell instances.png