object-oriented programming
Enable an AI agent to recognise an object-oriented programming approach, assess how its objects preserve contracts and collaborate, and determine which implementation or design changes are justified.
Research draft, second pass
A second pass drafted this model: the structure a model of this thing needs, and what is known about it in the world. The line under this one says how the second half was obtained - researched against sources, or recalled without web access, in which case nothing here was read anywhere and every claim is a lead to verify. Unreviewed either way.
Researched by: Codex + Grok
Purpose and description
Enable an AI agent to recognise an object-oriented programming approach, assess how its objects preserve contracts and collaborate, and determine which implementation or design changes are justified.
Object-oriented programming is a programming paradigm that structures a program as interacting objects, each locally retaining and protecting state and exposing behaviour through methods or messages, with classification (classes or prototypes) and late-bound polymorphic dispatch used to share and vary that behaviour.
It can be Classify a bounded implementation's object-oriented mechanisms using code and language evidence.; Trace an operation from its receiver through method lookup, dispatch and delegated calls.; Identify exposed state, invariant violations and unsafe assumptions about object identity.; Assess whether a proposed subtype preserves the behavioural expectations of its callers.; Propose changes to responsibility allocation, interfaces, composition or inheritance and specify the evidence needed before applying them.; Construct checks for object contracts, lifecycle transitions and polymorphic behaviour..
Distinguishing features
Determine whether objects receive operations through a defined interface and supply associated behaviour; records merely passed among free functions are insufficient evidence by themselves.
Determine whether object boundaries organise responsibilities and state access in actual code; the presence of class declarations alone does not establish an object-oriented design.
Identify whether operations can select behaviour through a receiver's class, prototype or other object mechanism; distinguish this from branches over externally interpreted type tags without assuming every object-oriented design requires dynamic dispatch.
Determine whether classes act as object definitions, namespaces or data containers; distinguish object-oriented use from procedural code packaged inside classes.
For an entity-component design, determine whether behaviour resides in collaborating objects or primarily in systems processing passive components; record mixed cases rather than classifying by terminology.
Scope
+ Evidence that a program organises behaviour around objects and their interactions
+ Object identity, state ownership, encapsulation and invariants
+ Class-based or prototype-based object construction and behaviour reuse
+ Method lookup, dynamic dispatch, polymorphism and behavioural contracts
+ Object collaboration, composition, inheritance and substitutability
+ Assessment and modification of an object-oriented design within its implementation context
- Complete programming-language syntax, compiler implementation and language specification
- General software requirements, product capabilities and business-domain definitions
- Database schemas, persistence engines and object-relational mapping configuration
- Deployment architecture, infrastructure operation and service topology
- General project management, developer competency and team organisation
- Functional, procedural or logic programming except where needed to identify boundaries or mixed approaches
Characteristics
- Assessment boundary
- language capability | codebase | subsystem | library | design proposal Separates what a language permits from what a particular implementation actually does.
- Object organisation mechanism
- class-based | prototype-based | hybrid | other documented mechanism | unresolved Determines how objects obtain behaviour and which construction or extension operations are available.
- Identity semantics
- reference identity | value equality | both with explicit distinction | context-dependent | unresolved Controls whether replacement, copying and aliasing preserve observable behaviour.
- State exposure
- hidden behind operations | exposed read-only | directly mutable | mixed | unresolved Shows which callers can bypass invariant-preserving operations.
- Dispatch mechanism
- Record supported and used mechanisms, such as static binding, receiver-based dynamic dispatch, multiple dispatch or prototype delegation. Determines which implementation an operation invokes and how extensions affect callers.
- Behavioural contract evidence
- unspecified | documented | partially checked | checked within a stated boundary | known violation Distinguishes an assumed contract from one supported by review, tests or formal evidence.
- Reuse and substitution relationships
- composition | delegation | implementation inheritance | declared subtyping | structural compatibility; identify endpoints and evidence Prevents code reuse from being mistaken for behavioural substitutability.
- Inheritance depth
- Maximum number of inheritance edges from a root to a assessed type, with treatment of multiple inheritance stated Indicates how far inherited behaviour may need to be traced; it is not a standalone quality score.
- Mutable-state sharing
- Record which objects share access to mutable state and which operations may modify it. Reveals where local changes can affect other objects and where coordination is required.
Also called
Where this came from
wikidata · CC0 1.0
Drafted structure
Bundle to layer to finding to question, as the second pass will find it: 6 bundles · 11 layers · 18 findings · 28 questions.
Paradigm and object mechanisms Establishes where object-oriented programming is being assessed and how objects are represented.
An agent must distinguish actual object-oriented organisation from language support, class syntax or terminology.
Application boundary
Defines the unit of assessment and the evidence for its programming approach.
Object-oriented organisation
Records how responsibilities and interactions are organised around objects within the selected boundary.
- Which codebase, subsystem or design proposal is assessed, and which responsibilities are assigned to objects? boundary
- Which code examples or design records demonstrate object-centred behaviour rather than classes used only as namespaces or records? provenance
Object definition mechanisms
Identifies how instances obtain state and behaviour.
Classes, prototypes and instance structure
Records the mechanisms used to define, instantiate and alter objects without treating classes as mandatory.
- Do objects obtain behaviour from classes, prototypes, per-instance members or another documented mechanism? definition
- Can an object's members or behaviour providers change after creation, and what language or runtime evidence establishes this? provenance
Identity, state and encapsulation Captures what makes an object the same object and how its state remains valid.
Safe object manipulation depends on distinguishing identity from equality and knowing who can alter state.
Identity and aliasing
Examines equality, copying and shared references.
Identity, equality and copy contracts
Records when references denote the same object and when distinct objects count as equal.
- How are object identity and value equality distinguished, including any equality and hashing contract? definition
- When an object is copied or replaced, which identities and references remain shared, and which caller observations must remain equivalent? action
State access and invariants
Identifies protected conditions and paths that can bypass their enforcement.
Invariant enforcement boundary
Records valid object states, permitted mutation paths and the limits of encapsulation.
- Which conditions must hold at observable operation boundaries, and which constructors or methods establish and preserve them? definition
- Can callers bypass those methods through public fields, mutable values returned by accessors, aliases or reflective access? boundary
Interfaces, dispatch and substitution Connects callable object contracts with implementation selection and replacement.
An agent must know both which behaviour executes and whether alternative implementations satisfy caller expectations.
Operation resolution
Captures how a requested operation resolves to executable behaviour.
Method lookup and dispatch
Records binding, overriding and lookup rules used by the assessed implementation.
- For a representative operation, which receiver, declared types, runtime types or prototype links determine the selected implementation? definition
- Which language rules and code evidence distinguish overloading, overriding, member hiding and delegation where they occur? provenance
Behavioural compatibility
Assesses polymorphic replacement against observable obligations.
Substitution obligations
Records preconditions, outcomes, failures and state effects that implementations must preserve.
- What inputs, results, exceptions and state changes may callers rely on through the shared interface? definition
- What evidence shows that a proposed replacement accepts the required inputs and preserves those guarantees? action
Responsibilities and object collaboration Describes how objects divide work and combine behaviour.
Object boundaries determine where changes belong and how their effects propagate through collaborators.
Responsibility allocation
Locates decisions, state and operations across collaborating objects.
Collaboration and knowledge boundaries
Records which objects perform a task and how much each knows about others' internals.
- For a representative task, which object owns each decision and which collaborators does it invoke? definition
- Which interactions depend on collaborators' internal representation or long navigation chains, and what changes would those dependencies propagate? boundary
Reuse and extension
Separates behaviour sharing from interface compatibility.
Inheritance, composition and delegation
Records the intent and consequences of each mechanism used to reuse or extend behaviour.
- Which relationships provide implementation reuse, which promise substitution, and which forward work to contained or referenced objects? definition
- For a proposed extension, what caller contracts, override dependencies and ownership assumptions determine whether inheritance, composition or delegation is appropriate? action
Object lifecycle and change evidence Records when objects are usable and what evidence permits changes to their behaviour or structure.
Correct method definitions alone do not establish valid construction, safe retirement or preservation of behaviour during change.
Construction and retirement
Captures object readiness, valid transitions and responsibility for resources.
Lifecycle validity
Records how objects become valid, which operations are legal in each state and how obligations end.
- When does an object become valid for use, and can partially initialised state escape through callbacks, registration or overridable constructor calls? boundary
- Which operations are permitted after each lifecycle transition, and who must release any resources the object owns? action
Behaviour-preserving change
Defines the observations and checks needed to assess object-oriented refactoring.
Refactoring evidence
Records whether a proposed structural change preserves required contracts, identity effects and interactions.
- Which observable results, state transitions, identity relationships and collaborator effects must a proposed refactoring preserve? boundary
- Which contract checks and representative interaction tests support the change, and which affected behaviours remain unchecked? action
Evidence and external alignment What the world already says about this thing, gathered so the model can be checked against it.
A model that cannot be lined up against existing standards, identifiers and practice cannot be adopted by anyone who already uses them.
Reported evidence
Findings from the breadth pass, kept separate from the structural claims.
Kinds and varieties
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Class-based OOP (objects instantiated from classes; Simula, Smalltalk, Java, C++, C#, Python)
- Prototype-based OOP (objects cloned and extended from other objects; Self, JavaScript, Lua)
- Message-passing OOP (computation as sending messages to a receiver; Smalltalk, Objective-C, some actor-flavoured designs)
- Statically typed, nominal class OOP with compile-time checking (C++, Java, C#, Eiffel, Ada tagged types)
- Object-based style: encapsulation and identity without inheritance (Wegner's distinction; some early Visual Basic, modules-as-objects)
- Multiple-inheritance OOP versus single inheritance plus interfaces or protocols (C++/Eiffel/Python versus Java/C#/Objective-C)
- Trait-, mixin-, or composition-based OOP (Scala traits, Ruby mixins, Rust-adjacent trait objects in multi-paradigm use)
- Hybrid / multi-paradigm OOP, where objects coexist with procedures, functions, or generic programming in one language
- Which of these kinds and varieties hold for the sense of object-oriented programming this model covers, and on what evidence? provenance
Identifiers and schemes
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Wikidata - Q79872 - Item 'object-oriented programming'.
- Library of Congress Subject Headings - Object-oriented programming (Computer science) - Standard bibliographic heading; related headings cover object-oriented methods and languages.
- Wikipedia / Wikimedia sitelink - Object-oriented_programming - English article title; other language editions use local equivalents (e.g. Programmation orientée objet).
- ACM Computing Classification System (2012) - Software and its engineering ~ Software notations and tools ~ General programming languages ~ Language types ~ Object oriented languages - CCS concept path rather than a short numeric code; used to index the literature.
- Which of these identifiers and schemes hold for the sense of object-oriented programming this model covers, and on what evidence? provenance
Standards and regulation
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- ISO/IEC 14882, Programming languages - C++ (ISO/IEC JTC 1/SC 22) - the principal international standard for a widely used class-based OO language.
- ISO/IEC 8652, Ada (ISO/IEC JTC 1/SC 22) - tagged types, dispatching, and related OO features in Ada.
- ISO/IEC 19505 (UML) / OMG Unified Modeling Language (Object Management Group, also published via ISO/IEC JTC 1) - modelling standard for OO structure and behaviour.
- ECMA-262, ECMAScript Language Specification (Ecma International; also ISO/IEC 16262) - prototype-based objects and, later, class syntax on top of prototypes.
- ANSI INCITS 319-1998 (R2007), Programming Language Smalltalk (INCITS/ANSI) - standardised Smalltalk, the canonical message-passing OO language.
- Java Language Specification (Oracle / Java Community Process) - de facto standard for mainstream statically typed class-based OOP; not an ISO language standard.
- OMG CORBA and related IDL (Object Management Group) - historically governed distributed objects, now largely legacy.
- Which of these standards and regulation hold for the sense of object-oriented programming this model covers, and on what evidence? provenance
Real-world use
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Enterprise information systems and application servers written in Java or C#, organised as classes, interfaces, and dependency-injected services.
- Desktop and mobile GUI toolkits (AppKit/UIKit, Android views, Qt, WPF, Swing/JavaFX) in which widgets are objects in an inheritance tree receiving events.
- Game engines and real-time simulations (Unity C# behaviours, Unreal C++ actors/UObject) where entities are objects with components or inheritance.
- Introductory computer-science courses that teach classes, objects, inheritance, and polymorphism as the first structuring method (often in Java or Python).
- CAD, compilers, and systems software in C++, using classes for ASTs, scene graphs, and resource owners.
- Web front ends in JavaScript/TypeScript, mixing prototypes, ES classes, and module objects.
- Analysis and design artefacts: UML class diagrams, CRC cards, domain models in DDD-style projects.
- Which of these real-world use hold for the sense of object-oriented programming this model covers, and on what evidence? provenance
Typical measurements
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Depth of Inheritance Tree (DIT) - 1-4 in application classes; frameworks sometimes 5-8; deeper trees are treated as a smell - inheritance levels
- Weighted Methods per Class (WMC) / method count - a focused class often ~5-20 methods; much higher values flag god classes - methods (sometimes complexity-weighted)
- Coupling Between Objects (CBO) - commonly kept below about 5-9 coupled types in CK-threshold practice; large services exceed this - distinct coupled classes
- Number of Children (NOC) - 0-3 for most application classes; base types in libraries may have tens to hundreds - immediate subclasses
- Lack of Cohesion of Methods (LCOM, variant-dependent) - near 0 for cohesive classes; high values (scale 0-1 or count-based) indicate split responsibilities - index or pair-count, depending on LCOM variant
- Runtime object allocations - from near-zero in stack-heavy C++ to millions per second in managed GUIs and servers - allocations per second (or bytes allocated per second)
- Which of these typical measurements hold for the sense of object-oriented programming this model covers, and on what evidence? provenance
Failure modes and hazards
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Fragile base class: a change in a superclass silently breaks subclasses that depended on undocumented behaviour.
- Diamond problem and repeated inheritance: ambiguous or duplicated state/behaviour under multiple inheritance.
- God object / blob class: one type accumulates unrelated responsibilities, defeating encapsulation.
- Yo-yo problem: understanding a method requires bouncing up and down a deep inheritance chain.
- Inheritance used for code reuse instead of subtype relation, producing incorrect substitutability (Liskov violations).
- Object-relational impedance mismatch: graphs of objects map poorly onto relational tables, causing lazy-load, identity, and transaction bugs.
- Aliasing and hidden mutable shared state: two references mutate the same object, causing race conditions or surprising side effects.
- Anemic domain model: classes hold data but no behaviour, leaving the design as procedural code over structs.
- Virtual dispatch, heap allocation, and pointer chasing: cache-unfriendly layouts and unpredictable latency (the data-oriented critique).
- Over-abstraction and pattern soup: excessive interfaces and indirection that hide the actual control flow.
- Which of these failure modes and hazards hold for the sense of object-oriented programming this model covers, and on what evidence? provenance
Regional variation
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- The paradigm originated in Norway (Simula 67, Nygaard/Dahl) and was reformulated in the US (Smalltalk at Xerox PARC; C++ at Bell Labs); teaching lineages still track those centres.
- In much European software-engineering usage, 'object orientation' names a whole method (OOA/OOD plus OOP, often with UML); US industry talk more often means the programming style in a given language.
- Eiffel/Meyer Design-by-Contract culture remains stronger in parts of Europe than in US enterprise Java/C# shops.
- Prototype-based practice is concentrated in JavaScript web culture; class-based static OOP dominates large organisations in North America, Europe, and East Asia.
- Introductory teaching has shifted in many English-speaking universities from Java-first OOP to Python, where OOP is optional and mixed with procedural style.
- Local names: German objektorientierte Programmierung, French programmation orientée objet, Russian объектно-ориентированное программирование; the English initialism OOP is widely borrowed.
- Which of these regional variation hold for the sense of object-oriented programming this model covers, and on what evidence? provenance
Neighbouring kinds and how to tell them apart
Reported by the breadth pass; each item needs checking against its source before it becomes normative.
- Procedural programming - Procedural code organises work as procedures operating on separate data; OOP binds data and operations to the same object identity and typically dispatches on the receiver.
- Abstract data type (ADT) - An ADT hides representation behind a type's operations but need not have object identity, inheritance, or late-bound messages; OOP objects are runtime identities that may be aliased and subclassed.
- Functional programming - FP centres on immutable values and function application without object identity as the main structuring device; OOP centres on encapsulated (often mutable) objects and polymorphic messages.
- Modular programming - Modules group declarations and control visibility at compile-time package granularity; objects are runtime instances with identity that can be created, aliased, and passed around.
- Actor model - Actors isolate state and communicate only by asynchronous messages, usually with concurrency in mind; ordinary OOP objects typically share a process and may be invoked synchronously, allowing aliasing.
- Component-based software - Components are independently deployable units wired through explicit provided/required interfaces; objects are language-level instances and need not be deployment or composition units.
- Data-oriented design - Data-oriented design lays out arrays of homogeneous data and transforms them for locality and throughput; OOP lays out heterogeneous objects with behaviour, often at the cost of that locality.
- Which of these neighbouring kinds and how to tell them apart hold for the sense of object-oriented programming this model covers, and on what evidence? provenance
Sources
- The Early History of Smalltalk - Kay's specialist account of OOP as messaging, local retention and protection of state, and extreme late binding, against later class-and-inheritance reductions.
- Dimensions of Object-Based Language Design - The still-used split between object-based languages (objects) and object-oriented languages (objects plus inheritance), and other design dimensions.
- The Quarks of Object-Oriented Development - Empirical practitioner consensus that encapsulation, inheritance, and polymorphism are the properties people actually treat as definitional.
- A Metrics Suite for Object Oriented Design - The CK quantities (WMC, DIT, NOC, CBO, RFC, LCOM) still used to measure OO designs.
- On Understanding Types, Data Abstraction, and Polymorphism - How inclusion polymorphism and data abstraction underpin typed OOP, and how that differs from ADTs alone.
- Unified Modeling Language (UML) specification - The dominant industrial notation for class, object, and related structure used to describe OO systems.
What the second pass must settle
- Which existing Vercy world models already own programming paradigms, object contracts or software design, and should this registry entry link to one of them?
- What operational recognition threshold should Vercy use for object-oriented programming in mixed codebases, especially where objects lack dynamic dispatch or contain little behaviour?
- Should the primary assessment unit be the programming approach itself or a bounded application of it, and how should those levels relate?
- Which language-specific extensions are needed for multiple dispatch, traits, mixins, prototype mutation and metaprogramming?
- When should concurrency, persistence identity and distributed object lifecycles extend this model rather than remain in neighbouring models?