Summary
Prototype-based programming is a style of object-oriented programming in which behaviour reuse (known as inheritance) is performed via a process of reusing existing objects that serve as prototypes. This model can also be known as prototypal, prototype-oriented, classless, or instance-based programming. Prototype-based programming uses the process generalized objects, which can then be cloned and extended. Using fruit as an example, a "fruit" object would represent the properties and functionality of fruit in general. A "banana" object would be cloned from the "fruit" object and general properties specific to bananas would be appended. Each individual "banana" object would be cloned from the generic "banana" object. Compare to the class-based paradigm, where a "fruit" class would be extended by a "banana" class. The first prototype-oriented programming language was Self, developed by David Ungar and Randall Smith in the mid-1980s to research topics in object-oriented language design. Since the late 1990s, the classless paradigm has grown increasingly popular. Some current prototype-oriented languages are JavaScript (and other ECMAScript implementations such as JScript and Flash's ActionScript 1.0), Lua, Cecil, NewtonScript, Io, Ioke, MOO, REBOL and AHK. Prototypal inheritance in JavaScript is described by Douglas Crockford as You make prototype objects, and then ... make new instances. Objects are mutable in JavaScript, so we can augment the new instances, giving them new fields and methods. These can then act as prototypes for even newer objects. We don't need classes to make lots of similar objects... Objects inherit from objects. What could be more object oriented than that? Advocates of prototype-based programming argue that it encourages the programmer to focus on the behavior of some set of examples and only later worry about classifying these objects into archetypal objects that are later used in a fashion similar to classes.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.
Related publications (119)
Related concepts (16)
Object-oriented programming
Object-Oriented Programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or properties), and the code is in the form of procedures (often known as methods). A common feature of objects is that procedures (or methods) are attached to them and can access and modify the object's data fields. In this brand of OOP, there is usually a special name such as or used to refer to the current object.
Self (programming language)
Self is an object-oriented programming language based on the concept of prototypes. Self began as a dialect of Smalltalk, being dynamically typed and using just-in-time compilation (JIT) as well as the prototype-based approach to objects: it was first used as an experimental test system for language design in the 1980s and 1990s. In 2006, Self was still being developed as part of the Klein project, which was a Self virtual machine written fully in Self. The latest version is 2017.1 released in May 2017.
NewtonScript
NewtonScript is a prototype-based programming language created to write programs for the Newton platform. It is heavily influenced by the Self programming language, but modified to be more suited to needs of mobile and embedded devices. On August 3, 1993, Apple unveiled the Apple Newton MessagePad. The device had 640 KB RAM, 4 MB ROM, and an 20 MHz ARM 610 microprocessor. The main intention behind Newton project, was to develop a device capable of replacing a computer while being portable.
Show more
Related courses (25)
CS-112(g): Object oriented programming
Ce cours approfondit les connaissances en programmation présentées dans le cours ICC du 1er semestre. L'accent est mis sur l'approche «orientée objet» (en C++), la conception et la spécification de pr
HUM-408: Industrial design I
Le cours propose d'expérimenter les spécificités du design industriel en confrontant les étudiant.e.s à la création d'un objet. Il s'agit d'un enseignement pratique dont le résultat est un objet fonct
CS-202: Computer systems
This course will teach operating systems and networks in an integrated fashion,emphasising the fundamental concepts and techniques that make their interaction possible/practical. Core lectures will be
Show more
Related lectures (63)
Abstract Data Structures and Standard Libraries
Covers abstract data structures and the C++ standard library, including linked lists, stacks, queues, and complex numbers.
Separate Compilation: Linker/Loader; Make
Covers separate compilation, linking modules, loader role, and makefile usage.
Advanced C Data Types
Covers advanced data types and memory management in C programming, emphasizing type consistency and dynamic array allocation.
Show more
Related MOOCs (3)
Introduction to Object-Oriented Programming in C++
Le cours suivi propose une introduction aux concepts de base de la programmation orientée objet tels que : encapsulation et abstraction, classes/objets, attributs/méthodes, héritage, polymorphisme, ..
Projet de programmation en java
The purpose of this MOOC is to offer a complementary capstone project to our existing MOOCs in introduction to programming. This will offer the students the possibility to both stabilize the already a
Introduction to Object-Oriented Programming in Java
Le cours suivi propose une introduction aux concepts de base de la programmation orientée objet tels que : encapsulation et abstraction, classes/objets, attributs/méthodes, héritage, polymorphisme, ..