[{"data":1,"prerenderedAt":532},["ShallowReactive",2],{"paradigm-object-oriented":3,"paradigm-members-object-oriented":404},{"id":4,"title":5,"assets":6,"author":7,"body":8,"description":53,"extension":370,"features":371,"homepage":377,"logo":6,"meta":378,"name":5,"navigation":379,"note":380,"paradigm":381,"path":382,"references":383,"relations":392,"seo":399,"status":400,"stem":401,"tour":6,"urls":6,"year":402,"__hash__":403},"paradigms\u002Fparadigms\u002Fobject-oriented.md","Object-oriented",null,"Ole-Johan Dahl and Kristen Nygaard (SIMULA 67); Alan Kay (coined the term)",{"type":9,"value":10,"toc":363},"minimark",[11,16,20,39,43,303,313,317,339,343,346,350,359],[12,13,15],"h2",{"id":14},"overview","Overview",[17,18,19],"p",{},"Object-oriented programming organizes a program around objects that bundle state with the procedures that act on it, combined through inheritance and late binding. SIMULA 67 introduced that combination in 1967, Alan Kay coined the term around the same time, and the style remains the dominant way large systems are structured.",[17,21,22,23,28,29,33,34,38],{},"Its canonical languages run from ",[24,25,27],"a",{"href":26},"\u002Flanguages\u002Fsmalltalk","Smalltalk"," through ",[24,30,32],{"href":31},"\u002Flanguages\u002Fjava","Java"," to ",[24,35,37],{"href":36},"\u002Flanguages\u002Fcsharp","C#",".",[12,40,42],{"id":41},"code","Code",[44,45,46,165,201,253],"code-group",{},[47,48,54],"pre",{"className":49,"code":50,"filename":51,"language":52,"meta":53,"style":53},"language-smalltalk shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\" an object bundles state with the messages that operate on it.\nObject subclass: Account [\n  | balance |\n  Account class >> new [\n    | r |\n    r := super new.\n    r init.\n    ^r\n  ]\n  init [ balance := 0 ]\n  deposit: amount [ balance := balance + amount ]\n  spend: amount   [ balance := balance - amount ]\n  printOn: stream [\n    super printOn: stream.\n    stream nextPutAll: ' with balance: '.\n    balance printOn: stream\n  ]\n]\n","primitives","smalltalk","",[41,55,56,64,70,76,82,88,94,100,106,112,118,124,130,136,142,148,154,159],{"__ignoreMap":53},[57,58,61],"span",{"class":59,"line":60},"line",1,[57,62,63],{},"\" an object bundles state with the messages that operate on it.\n",[57,65,67],{"class":59,"line":66},2,[57,68,69],{},"Object subclass: Account [\n",[57,71,73],{"class":59,"line":72},3,[57,74,75],{},"  | balance |\n",[57,77,79],{"class":59,"line":78},4,[57,80,81],{},"  Account class >> new [\n",[57,83,85],{"class":59,"line":84},5,[57,86,87],{},"    | r |\n",[57,89,91],{"class":59,"line":90},6,[57,92,93],{},"    r := super new.\n",[57,95,97],{"class":59,"line":96},7,[57,98,99],{},"    r init.\n",[57,101,103],{"class":59,"line":102},8,[57,104,105],{},"    ^r\n",[57,107,109],{"class":59,"line":108},9,[57,110,111],{},"  ]\n",[57,113,115],{"class":59,"line":114},10,[57,116,117],{},"  init [ balance := 0 ]\n",[57,119,121],{"class":59,"line":120},11,[57,122,123],{},"  deposit: amount [ balance := balance + amount ]\n",[57,125,127],{"class":59,"line":126},12,[57,128,129],{},"  spend: amount   [ balance := balance - amount ]\n",[57,131,133],{"class":59,"line":132},13,[57,134,135],{},"  printOn: stream [\n",[57,137,139],{"class":59,"line":138},14,[57,140,141],{},"    super printOn: stream.\n",[57,143,145],{"class":59,"line":144},15,[57,146,147],{},"    stream nextPutAll: ' with balance: '.\n",[57,149,151],{"class":59,"line":150},16,[57,152,153],{},"    balance printOn: stream\n",[57,155,157],{"class":59,"line":156},17,[57,158,111],{},[57,160,162],{"class":59,"line":161},18,[57,163,164],{},"]\n",[47,166,169],{"className":49,"code":167,"filename":168,"language":52,"meta":53,"style":53},"\" objects compose by message: one asks another to act.\na := Account new.\na deposit: 125.\na deposit: 20.\na spend: 10.\na printOn: Transcript.    \"an Account with balance: 135\n","combinations",[41,170,171,176,181,186,191,196],{"__ignoreMap":53},[57,172,173],{"class":59,"line":60},[57,174,175],{},"\" objects compose by message: one asks another to act.\n",[57,177,178],{"class":59,"line":66},[57,179,180],{},"a := Account new.\n",[57,182,183],{"class":59,"line":72},[57,184,185],{},"a deposit: 125.\n",[57,187,188],{"class":59,"line":78},[57,189,190],{},"a deposit: 20.\n",[57,192,193],{"class":59,"line":84},[57,194,195],{},"a spend: 10.\n",[57,197,198],{"class":59,"line":90},[57,199,200],{},"a printOn: Transcript.    \"an Account with balance: 135\n",[47,202,207],{"className":203,"code":204,"filename":205,"language":206,"meta":53,"style":53},"language-java shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F a class is a specification that subclasses refine.\npublic class Account {\n  private int balance;\n  public Account(int start) { balance = start; }\n  public int balance() { return balance; }\n}\npublic class Savings extends Account {\n  public Savings(int start) { super(start); }\n}\n","abstractions","java",[41,208,209,214,219,224,229,234,239,244,249],{"__ignoreMap":53},[57,210,211],{"class":59,"line":60},[57,212,213],{},"\u002F\u002F a class is a specification that subclasses refine.\n",[57,215,216],{"class":59,"line":66},[57,217,218],{},"public class Account {\n",[57,220,221],{"class":59,"line":72},[57,222,223],{},"  private int balance;\n",[57,225,226],{"class":59,"line":78},[57,227,228],{},"  public Account(int start) { balance = start; }\n",[57,230,231],{"class":59,"line":84},[57,232,233],{},"  public int balance() { return balance; }\n",[57,235,236],{"class":59,"line":90},[57,237,238],{},"}\n",[57,240,241],{"class":59,"line":96},[57,242,243],{},"public class Savings extends Account {\n",[57,245,246],{"class":59,"line":102},[57,247,248],{},"  public Savings(int start) { super(start); }\n",[57,250,251],{"class":59,"line":108},[57,252,238],{},[47,254,259],{"className":255,"code":256,"filename":257,"language":258,"meta":53,"style":53},"language-csharp shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F late binding: one message, whichever implementation answers it.\npublic class Account {\n  public virtual string Label => \"account\";\n}\npublic class Savings : Account {\n  public override string Label => \"savings\";\n}\nAccount[] accounts = { new Account(), new Savings() };\nforeach (var a in accounts) Console.WriteLine(a.Label);\n","idioms","csharp",[41,260,261,266,270,275,279,284,289,293,298],{"__ignoreMap":53},[57,262,263],{"class":59,"line":60},[57,264,265],{},"\u002F\u002F late binding: one message, whichever implementation answers it.\n",[57,267,268],{"class":59,"line":66},[57,269,218],{},[57,271,272],{"class":59,"line":72},[57,273,274],{},"  public virtual string Label => \"account\";\n",[57,276,277],{"class":59,"line":78},[57,278,238],{},[57,280,281],{"class":59,"line":84},[57,282,283],{},"public class Savings : Account {\n",[57,285,286],{"class":59,"line":90},[57,287,288],{},"  public override string Label => \"savings\";\n",[57,290,291],{"class":59,"line":96},[57,292,238],{},[57,294,295],{"class":59,"line":102},[57,296,297],{},"Account[] accounts = { new Account(), new Savings() };\n",[57,299,300],{"class":59,"line":108},[57,301,302],{},"foreach (var a in accounts) Console.WriteLine(a.Label);\n",[304,305,306],"note",{},[17,307,308,309,312],{},"The tour runs across the paradigm's own lineage - Smalltalk's message-sending\nobjects and its ",[41,310,311],{},"printOn:"," protocol, Java's class-and- subclass specification,\nthen C#'s virtual dispatch for late binding.",[12,314,316],{"id":315},"distinctive-traits","Distinctive traits",[318,319,320,324,327,330,333,336],"ul",{},[321,322,323],"li",{},"Objects own their state. Bundling data with the procedures that act on it stops one part of a program from silently changing another's data.",[321,325,326],{},"Late binding buys substitutability. A message reaches whichever implementation answers it, so a new subtype works without editing its users.",[321,328,329],{},"Classes are not essential. Rideau treats a class as a compile-time prototype for a type, making class-based object orientation a special case.",[321,331,332],{},"Kay's definition was messaging, not encapsulation: messaging, local retention of state, and extreme late binding of everything.",[321,334,335],{},"The consensus definition is the SIMULA trio: encapsulation, inheritance with late binding, and dynamic creation of objects at run time.",[321,337,338],{},"The definition is contested, not settled. Rideau argues encapsulation covers only half of object orientation, and that message passing is not essential to it.",[12,340,342],{"id":341},"status","Status",[17,344,345],{},"Still dominant, and contested. Object orientation structures most large systems, but its definition remains disputed: whether encapsulation, classes, or message passing is essential, and whether it should replace functional programming rather than merely combine with it.",[12,347,349],{"id":348},"history","History",[17,351,352,353,355,356,358],{},"Dahl and Nygaard began SIMULA in 1961 as a simulation language; SIMULA 67, completed in 1967, introduced classes, subclasses, late binding, and dynamic object creation. Kay, working at Utah and later Xerox PARC, coined \"object-oriented programming\" around 1967 and built ",[24,354,27],{"href":26}," on that idea, leaving inheritance out at first. Stroustrup carried SIMULA's philosophy to C++ systems programmers around 1980, and Gosling's ",[24,357,32],{"href":31}," followed in the 1990s.",[360,361,362],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":53,"searchDepth":66,"depth":66,"links":364},[365,366,367,368,369],{"id":14,"depth":66,"text":15},{"id":41,"depth":66,"text":42},{"id":315,"depth":66,"text":316},{"id":341,"depth":66,"text":342},{"id":348,"depth":66,"text":349},"md",[372,373,374,375,376],"encapsulation","inheritance","late-binding","message-passing","dynamic-object-creation","https:\u002F\u002Fethw.org\u002FMilestones:Object-Oriented_Programming,_1961-1967",{},true,"Programming languages organized around objects that bundle state with the procedures that operate on it, combined through inheritance and late binding. Introduced in SIMULA 67 (1967) and named by Alan Kay; still the dominant style of large-scale software.","object-oriented","\u002Fparadigms\u002Fobject-oriented",[384,386,389],{"url":377,"title":385},"Milestone: Object-Oriented Programming, 1961-1967 (IEEE Engineering and Technology History Wiki)",{"url":387,"title":388},"https:\u002F\u002Fwww.purl.org\u002Fstefan_ram\u002Fpub\u002Fdoc_kay_oop_en","Dr. Alan Kay on the Meaning of Object-Oriented Programming (2003 e-mail, Stefan Ram archive)",{"url":390,"title":391},"https:\u002F\u002Ffare.tunes.org\u002Ffiles\u002Fcs\u002Fpoof\u002Fltuo.html","Lambda: The Ultimate Object - Object Orientation Elucidated (François-René Rideau)",[393,396],{"name":394,"kind":395},"imperative","shares-ancestor-with",{"name":397,"kind":398},"functional","interoperates-with",{"title":5,"description":53},"active","paradigms\u002Fobject-oriented",1967,"ryPaUWqr8Pn-Rdl-Hm9rK3V8GGO6Al2Qpu9qWb0lIiA",[405,412,416,418,423,428,432,438,442,447,452,455,460,466,470,472,476,481,486,491,496,502,506,511,513,518,524,528],{"name":406,"path":407,"logo":408,"year":409,"kind":410,"note":411},"ActionScript","\u002Flanguages\u002Factionscript","\u002Flogos\u002Factionscript.png",1998,"language","ECMAScript-dialect scripting language of the Adobe Flash platform; grew from a Flash-4 'actions' toy into ActionScript 3.0 — a class-based, runtime-typed language running on the JIT-compiled AVM2 virtual machine",{"name":413,"path":414,"logo":6,"year":6,"kind":410,"note":415},"BOBJ","\u002Flanguages\u002Fbobj","Java reimplementation of OBJ3 adding hidden algebra: behavioural theories, auto-generated cobases and circular coinductive rewriting. It is the family member built specifically to prove that two specifications are observationally equal, and the only one with higher-order parameterized programming.",{"name":37,"path":36,"logo":6,"year":417,"kind":410,"note":6},2002,{"name":419,"path":420,"logo":6,"year":421,"kind":410,"note":422},"CafeOBJ","\u002Flanguages\u002Fcafeobj",1997,"Successor to OBJ adding hidden sorts, behavioural specification and rewriting logic under one institution-based semantics. Its distinguishing practice is the proof score: a proof is CafeOBJ source, executed by reduction, so specification and verification share one tool.",{"name":424,"path":425,"logo":6,"year":426,"kind":410,"note":427},"Common Lisp","\u002Flanguages\u002Fcommon-lisp",1984,"The standardized, large Lisp: one specification (ANSI INCITS 226-1994, first published as *Common Lisp: The Language* in 1984) covering a condition system, CLOS with multiple dispatch, and a separate function\u002Fvalue namespace. It unified the competing 1980s Lisp dialects rather than descending from one.",{"name":429,"path":430,"logo":6,"year":6,"kind":410,"note":431},"Cosmos","\u002Flanguages\u002Fcosmos","A modern logic scripting language; relations may yield multiple results, unlike functions",{"name":433,"path":434,"logo":435,"year":421,"kind":436,"note":437},"ECMAScript","\u002Flanguages\u002Fecmascript","\u002Flogos\u002Fjavascript.jpg","standard","The Ecma standard (ECMA-262) that browser JavaScript engines implement; TC39 develops it in the open, publishing an edition every June since the stalled fourth edition was replaced by the Harmony process in 2008.",{"name":439,"path":440,"logo":6,"year":6,"kind":410,"note":441},"FOOPS","\u002Flanguages\u002Ffoops","Declarative object-oriented language built on OBJ3, giving classes, inheritance with overriding and a module interconnection language one equational semantics. It carried the OBJ module system into the object paradigm and was used to develop the refinement methods that OOZE later reused.",{"name":443,"path":444,"logo":6,"year":445,"kind":410,"note":446},"Glam","\u002Flanguages\u002Fglam",2026,"A high-level language for composing assembly-level software: an untyped, lazy lambda calculus whose modules are mixins, whose assembly steps are effects, and whose builds are reproducible.",{"name":448,"path":449,"logo":6,"year":450,"kind":410,"note":451},"IronJS","\u002Flanguages\u002Fironjs",2010,"ECMAScript 3 implementation on Microsoft's Dynamic Language Runtime, embedding a JavaScript engine in .NET apps; named in the IronPython\u002FIronRuby tradition despite being an independent project by Fredrik Holmström.",{"name":453,"path":454,"logo":6,"year":6,"kind":6,"note":6},"Ironwood","\u002Flanguages\u002Fironwood",{"name":456,"path":457,"logo":6,"year":458,"kind":410,"note":459},"JS++","\u002Flanguages\u002Fjsplusplus",2011,"Typed JavaScript superset by Onux with an optional sound gradual type system: the Unified External Type walls off JS dynamics, C-style annotations hold at runtime, and integer types guarantee no NaN surprises.",{"name":461,"path":462,"logo":435,"year":463,"kind":464,"note":465},"JScript","\u002Flanguages\u002Fjscript",1996,"dialect","Microsoft's ECMAScript dialect, shipped with Internet Explorer 3 (1996); JScript 3.0 (1997) was Microsoft's 'first scripting language to fully conform to ECMA-262', and the name avoided Sun's JavaScript trademark.",{"name":467,"path":468,"logo":6,"year":417,"kind":410,"note":469},"JScript.NET","\u002Flanguages\u002Fjscript-net","Microsoft's 2002 CLI language for Visual Studio .NET: JScript's dynamics plus ES4-draft classes and optional strong typing, compiled to .NET bytecode. Never supported in Visual Studio's designers; died with that generation.",{"name":32,"path":31,"logo":6,"year":471,"kind":410,"note":6},1995,{"name":473,"path":474,"logo":435,"year":471,"kind":410,"note":475},"JavaScript","\u002Flanguages\u002Fjavascript","Netscape's browser scripting language: dynamically typed, prototype-based, garbage-collected. Standardized as ECMAScript (ECMA-262) and executed everywhere by engines like V8, SpiderMonkey, and JavaScriptCore, in browsers and Node.js.",{"name":477,"path":478,"logo":6,"year":479,"kind":410,"note":480},"JavaScript OSA","\u002Flanguages\u002Fjavascript-osa",2001,"Freeware Macintosh scripting language embedding Mozilla's SpiderMonkey engine into Apple's Open Scripting Architecture (2001) — JavaScript as an AppleScript alternative, with Core\u002FMacOS host objects and Apple-event bindings.",{"name":482,"path":483,"logo":6,"year":484,"kind":410,"note":485},"Managed JScript","\u002Flanguages\u002Fmanaged-jscript",2007,"Microsoft's ECMAScript 3 implementation on the Dynamic Language Runtime, shipped with Silverlight 1.1 Alpha (MIX07) and ASP.NET Futures; distinct from JScript.NET — no typed variables, classes, or assembly output.",{"name":487,"path":488,"logo":6,"year":489,"kind":410,"note":490},"Mascara","\u002Flanguages\u002Fmascara",2008,"Translator that extended JavaScript with abandoned-ES4 features — classes, namespaces, and optional type-checking — compiling to lowest-common-denominator JavaScript runnable in any browser.",{"name":492,"path":493,"logo":6,"year":494,"kind":410,"note":495},"Maude","\u002Flanguages\u002Fmaude",1999,"Reflective language and interpreter for rewriting logic, extending OBJ's equational core to concurrent and nondeterministic systems. Programs are rewrite theories; computation, search and LTL model checking are all deduction, which is why it doubles as a language framework.",{"name":497,"path":498,"logo":499,"year":500,"kind":410,"note":501},"Newspeak","\u002Flanguages\u002Fnewspeak","\u002Flogos\u002Fnewspeak.png",2009,"Bracha's live, object-capability language in the Smalltalk and Self tradition: nested classes are modules, every class name is late-bound, and the IDE runs in the browser from a serialized snapshot. Mixins, actors, and an incremental typechecker come with the platform.",{"name":503,"path":504,"logo":6,"year":471,"kind":410,"note":505},"Oz","\u002Flanguages\u002Foz","A multiparadigm language built on the concurrent constraint model: variables are single-assignment logic variables, threads are dataflow threads that suspend until their inputs are bound, and one kernel supports functional, object-oriented, constraint, and search programming. Implemented by the Mozart system.",{"name":507,"path":508,"logo":6,"year":509,"kind":410,"note":510},"Plush","\u002Flanguages\u002Fplush",2025,"Maxime Chevalier-Boisvert's minimal dynamically-typed language and register-based VM for teaching and creative coding: actors instead of locks, no FFI, and window, audio and socket host functions built in.",{"name":27,"path":26,"logo":6,"year":512,"kind":410,"note":6},1972,{"name":514,"path":515,"logo":6,"year":516,"kind":410,"note":517},"Spec#","\u002Flanguages\u002Fspecsharp",2005,"Microsoft Research's design-by-contract extension of C#: non-null reference types, method pre- and postconditions, checked exceptions, and object invariants checked by a static verifier that translates to Boogie.",{"name":519,"path":520,"logo":521,"year":522,"kind":410,"note":523},"TypeScript","\u002Flanguages\u002Ftypescript","\u002Flogos\u002Ftypescript.png",2012,"Microsoft's statically typed superset of JavaScript: optional type annotations are erased in compilation, interfaces and generics scale up contracts, and every JavaScript program is already valid TypeScript.",{"name":525,"path":526,"logo":6,"year":409,"kind":410,"note":527},"UnrealScript","\u002Flanguages\u002Funrealscript","Epic's native Unreal Engine scripting language: a single-inheritance, compile-time-checked object system with states, latent functions and replication built in. Removed in Unreal Engine 4 in favour of C++ and Blueprints.",{"name":529,"path":530,"logo":6,"year":6,"kind":464,"note":531},"Visual Basic for Applications","\u002Flanguages\u002Fvisual-basic-for-applications","Microsoft's hosted dialect of Visual Basic: a macro and automation language that runs only inside a host application. It superseded Excel's XLM macro language and made each host's object model the standard library.",1795219071432]