Everything about Metaclass
Class that describes common behavior for classes
In object-oriented programming, a metaclass is a class whose syntactic definitions are used for the syntactic definition of the classes themselves. Unlike ordinary classes, which define the behaviors of objects, metaclasses specify the behaviors of classes and their instances. Not all object-oriented programming languages support the concept of metaclasses. For those that do, the extent of control metaclasses have over class behaviors varies. Metaclasses are often implemented by treating classes as first-class citizens, making a metaclass an object that creates and manages these classes. Each programming language adheres to its own metaobject protocol, which are the rules that determine interactions among objects, classes, and metaclasses. Metaclasses are utilized to automate code generation and to enhance framework development. Wikipedia →
đź§ Start here: a 6-step reading path
- Read the overview: MetaclassA 5-minute orientation
- Pick up a classic book: Smalltalk-80The most-reprinted book on the subject
- Read the landmark paper: Materialization and its metaclass implementationCited 23 times
- Go sideways: Type introspectionA closely related topic
- Go sideways: Class (programming)A closely related topic
đź“– Definitions
Noun A class that serves as a template for other classes rather than objects.
🗂️ The subject at a glance
🏆 Landmark papers (most cited)
Materialization and its metaclass implementation
A role model and its metaclass implementation
MetaClass, a Comprehensive Classification System for Predicting the Occurrence of Metabolic Reactions Based on the MetaQSAR Database
Metaclass compatibility
Uniform and safe metaclass composition
Safe metaclass composition using mixin-based inheritance
Reflections on metaclass programming in SOM
Safe metaclass programming
📚 Books worth reading
Smalltalk-80Adele Goldberg, David Robson · 1983
Putting Metaclasses to WorkIra R. Forman, Scott H. Danforth · 1998
Metaclasses and their applicationWolfgang Klas · 1995
Putting metaclasses to workIra R. Forman · 1999- 📕Advanced SqueakThe Open The Open Courses Library · 2019
Programming GroovyVenkat Subramaniam · 2008
Ranked by number of editions on Open Library, a rough measure of how lasting a book is.
đź”— Related topics
- Type introspection In computing, type introspection is the ability of a program to examine the type or properties of an object at runtime. Some programming languages possess…
- Class (programming) In programming, a class is a syntactic entity structure used to create objects. The capabilities of a class differ between programming languages, but generally…
- Comparison of programming languages (object-oriented programming) This comparison of programming languages compares how object-oriented programming languages such as C++, Java, Smalltalk, Object Pascal, Perl, Python,…
- ObjVlisp ObjVlisp is a 1984 object-oriented extension of Vlisp–Vincennes LISP, a LISP dialect developed since 1971 at the University of Paris VIII – Vincennes.…
- Constructor (object-oriented programming) In class-based, object-oriented programming, a constructor (abbreviation: ctor) is a special type of function called to create an object. It prepares the…
- Reflective programming In computer science, reflective programming or reflection is the ability of a process to examine, introspect, and modify its own structure and behavior…
- Metaobject In computer science, a metaobject is an object that manipulates, creates, describes, or implements objects (including itself). The object that the metaobject…
- This (computer programming) this, self, and Me are keywords used in some computer programming languages to refer to the object, class, or other entity which the currently running…