CINXE.COM
Prototype-based programming - Wikipedia
<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available" lang="en" dir="ltr"> <head> <meta charset="UTF-8"> <title>Prototype-based programming - Wikipedia</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-enabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy", "wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"8c1c3bfa-b9fc-4576-8a77-1d3bce8866b9","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Prototype-based_programming","wgTitle":"Prototype-based programming","wgCurRevisionId":1248049781,"wgRevisionId":1248049781,"wgArticleId":61003,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","All articles with unsourced statements","Articles with unsourced statements from January 2012","Articles with unsourced statements from March 2013","Prototype-based programming","Object-oriented programming","Programming paradigms","Type theory"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName": "Prototype-based_programming","wgRelevantArticleId":61003,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":false,"wgFlaggedRevsParams":{"tags":{"status":{"levels":1}}},"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":false,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":20000,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q180868","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList", "mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","jquery.makeCollapsible.styles":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.pygments.view","site","mediawiki.page.ready","jquery.makeCollapsible","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.ReferenceTooltips" ,"ext.gadget.switcher","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","ext.cx.uls.quick.actions","wikibase.client.vector-2022","ext.checkUser.clientHints","ext.growthExperiments.SuggestedEditSession","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.cite.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cjquery.makeCollapsible.styles%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&only=styles&skin=vector-2022"> <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&raw=1&skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Prototype-based programming - Wikipedia"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//en.m.wikipedia.org/wiki/Prototype-based_programming"> <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Prototype-based_programming&action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="Wikipedia (en)"> <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://en.wikipedia.org/wiki/Prototype-based_programming"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en"> <link rel="alternate" type="application/atom+xml" title="Wikipedia Atom feed" href="/w/index.php?title=Special:RecentChanges&feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Prototype-based_programming rootpage-Prototype-based_programming skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">Jump to content</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="Main menu" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">Main menu</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">Main menu</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">hide</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> Navigation </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z"><span>Main page</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Wikipedia:Contents" title="Guides to browsing Wikipedia"><span>Contents</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:Current_events" title="Articles related to current events"><span>Current events</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:Random" title="Visit a randomly selected article [x]" accesskey="x"><span>Random article</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:About" title="Learn about Wikipedia and how it works"><span>About Wikipedia</span></a></li><li id="n-contactpage" class="mw-list-item"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia"><span>Contact us</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> Contribute </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-help" class="mw-list-item"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia"><span>Help</span></a></li><li id="n-introduction" class="mw-list-item"><a href="/wiki/Help:Introduction" title="Learn how to edit Wikipedia"><span>Learn to edit</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:Community_portal" title="The hub for editors"><span>Community portal</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:RecentChanges" title="A list of recent changes to Wikipedia [r]" accesskey="r"><span>Recent changes</span></a></li><li id="n-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_upload_wizard" title="Add images or other media for use on Wikipedia"><span>Upload file</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/Main_Page" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="Wikipedia" src="/static/images/mobile/copyright/wikipedia-wordmark-en.svg" style="width: 7.5em; height: 1.125em;"> <img class="mw-logo-tagline" alt="The Free Encyclopedia" src="/static/images/mobile/copyright/wikipedia-tagline-en.svg" width="117" height="13" style="width: 7.3125em; height: 0.8125em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:Search" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="Search Wikipedia [f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>Search</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="Search Wikipedia" aria-label="Search Wikipedia" autocapitalize="sentences" title="Search Wikipedia [f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:Search"> </div> <button class="cdx-button cdx-search-input__end-button">Search</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="Personal tools"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page's font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="Appearance" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">Appearance</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" class=""><span>Donate</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:CreateAccount&returnto=Prototype-based+programming" title="You are encouraged to create an account and log in; however, it is not mandatory" class=""><span>Create account</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:UserLogin&returnto=Prototype-based+programming" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o" class=""><span>Log in</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out" title="Log in and more options" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="Personal tools" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">Personal tools</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="User menu" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en"><span>Donate</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:CreateAccount&returnto=Prototype-based+programming" title="You are encouraged to create an account and log in; however, it is not mandatory"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>Create account</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:UserLogin&returnto=Prototype-based+programming" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>Log in</span></a></li> </ul> </div> </div> <div id="p-user-menu-anon-editor" class="vector-menu mw-portlet mw-portlet-user-menu-anon-editor" > <div class="vector-menu-heading"> Pages for logged out editors <a href="/wiki/Help:Introduction" aria-label="Learn more about editing"><span>learn more</span></a> </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-anoncontribs" class="mw-list-item"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y"><span>Contributions</span></a></li><li id="pt-anontalk" class="mw-list-item"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n"><span>Talk</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="Site"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="Contents" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">Contents</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">hide</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">(Top)</div> </a> </li> <li id="toc-Design_and_implementation" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Design_and_implementation"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>Design and implementation</span> </div> </a> <ul id="toc-Design_and_implementation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Object_construction" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Object_construction"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>Object construction</span> </div> </a> <ul id="toc-Object_construction-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Delegation" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Delegation"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>Delegation</span> </div> </a> <ul id="toc-Delegation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Concatenation" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Concatenation"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>Concatenation</span> </div> </a> <ul id="toc-Concatenation-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Criticism" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Criticism"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Criticism</span> </div> </a> <ul id="toc-Criticism-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Languages_supporting_prototype-based_programming" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Languages_supporting_prototype-based_programming"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Languages supporting prototype-based programming</span> </div> </a> <ul id="toc-Languages_supporting_prototype-based_programming-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-See_also" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#See_also"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>See also</span> </div> </a> <ul id="toc-See_also-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-References" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#References"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>References</span> </div> </a> <ul id="toc-References-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Further_reading" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Further_reading"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>Further reading</span> </div> </a> <ul id="toc-Further_reading-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="Contents" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="Toggle the table of contents" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">Toggle the table of contents</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-main">Prototype-based programming</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="Go to an article in another language. Available in 22 languages" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-22" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">22 languages</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/%D0%9F%D1%80%D0%BE%D1%82%D0%BE%D1%82%D0%B8%D0%BF%D0%BD%D0%BE_%D0%B1%D0%B0%D0%B7%D0%B8%D1%80%D0%B0%D0%BD%D0%BE_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%B8%D1%80%D0%B0%D0%BD%D0%B5" title="Прототипно базирано програмиране – Bulgarian" lang="bg" hreflang="bg" data-title="Прототипно базирано програмиране" data-language-autonym="Български" data-language-local-name="Bulgarian" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Programaci%C3%B3_basada_en_prototips" title="Programació basada en prototips – Catalan" lang="ca" hreflang="ca" data-title="Programació basada en prototips" data-language-autonym="Català" data-language-local-name="Catalan" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Prototypenbasierte_Programmierung" title="Prototypenbasierte Programmierung – German" lang="de" hreflang="de" data-title="Prototypenbasierte Programmierung" data-language-autonym="Deutsch" data-language-local-name="German" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Programaci%C3%B3n_basada_en_prototipos" title="Programación basada en prototipos – Spanish" lang="es" hreflang="es" data-title="Programación basada en prototipos" data-language-autonym="Español" data-language-local-name="Spanish" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D9%87%E2%80%8C%D9%86%D9%88%DB%8C%D8%B3%DB%8C_%D8%A8%D8%B1_%D9%BE%D8%A7%DB%8C%D9%87_%D9%BE%DB%8C%D8%B4%E2%80%8C%D9%86%D9%85%D9%88%D9%86%D9%87" title="برنامهنویسی بر پایه پیشنمونه – Persian" lang="fa" hreflang="fa" data-title="برنامهنویسی بر پایه پیشنمونه" data-language-autonym="فارسی" data-language-local-name="Persian" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Programmation_orient%C3%A9e_prototype" title="Programmation orientée prototype – French" lang="fr" hreflang="fr" data-title="Programmation orientée prototype" data-language-autonym="Français" data-language-local-name="French" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%ED%94%84%EB%A1%9C%ED%86%A0%ED%83%80%EC%9E%85_%EA%B8%B0%EB%B0%98_%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D" title="프로토타입 기반 프로그래밍 – Korean" lang="ko" hreflang="ko" data-title="프로토타입 기반 프로그래밍" data-language-autonym="한국어" data-language-local-name="Korean" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Protot%C3%ADpusra_alapul%C3%B3_programoz%C3%A1s" title="Prototípusra alapuló programozás – Hungarian" lang="hu" hreflang="hu" data-title="Prototípusra alapuló programozás" data-language-autonym="Magyar" data-language-local-name="Hungarian" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ml mw-list-item"><a href="https://ml.wikipedia.org/wiki/%E0%B4%AA%E0%B5%8D%E0%B4%B0%E0%B5%8B%E0%B4%9F%E0%B5%8D%E0%B4%9F%E0%B5%8B%E0%B4%9F%E0%B5%88%E0%B4%AA%E0%B5%8D%E0%B4%AA%E0%B5%8D_%E0%B4%85%E0%B4%9F%E0%B4%BF%E0%B4%B8%E0%B5%8D%E0%B4%A5%E0%B4%BE%E0%B4%A8%E0%B4%AE%E0%B4%BE%E0%B4%95%E0%B5%8D%E0%B4%95%E0%B4%BF%E0%B4%AF%E0%B5%81%E0%B4%B3%E0%B5%8D%E0%B4%B3_%E0%B4%AA%E0%B5%8D%E0%B4%B0%E0%B5%8B%E0%B4%97%E0%B5%8D%E0%B4%B0%E0%B4%BE%E0%B4%AE%E0%B4%BF%E0%B4%82%E0%B4%97%E0%B5%8D" title="പ്രോട്ടോടൈപ്പ് അടിസ്ഥാനമാക്കിയുള്ള പ്രോഗ്രാമിംഗ് – Malayalam" lang="ml" hreflang="ml" data-title="പ്രോട്ടോടൈപ്പ് അടിസ്ഥാനമാക്കിയുള്ള പ്രോഗ്രാമിംഗ്" data-language-autonym="മലയാളം" data-language-local-name="Malayalam" class="interlanguage-link-target"><span>മലയാളം</span></a></li><li class="interlanguage-link interwiki-nl mw-list-item"><a href="https://nl.wikipedia.org/wiki/Prototype-gebaseerd_programmeren" title="Prototype-gebaseerd programmeren – Dutch" lang="nl" hreflang="nl" data-title="Prototype-gebaseerd programmeren" data-language-autonym="Nederlands" data-language-local-name="Dutch" class="interlanguage-link-target"><span>Nederlands</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/%E3%83%97%E3%83%AD%E3%83%88%E3%82%BF%E3%82%A4%E3%83%97%E3%83%99%E3%83%BC%E3%82%B9" title="プロトタイプベース – Japanese" lang="ja" hreflang="ja" data-title="プロトタイプベース" data-language-autonym="日本語" data-language-local-name="Japanese" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Programa%C3%A7%C3%A3o_baseada_em_prot%C3%B3tipos" title="Programação baseada em protótipos – Portuguese" lang="pt" hreflang="pt" data-title="Programação baseada em protótipos" data-language-autonym="Português" data-language-local-name="Portuguese" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Prototip_(POO)" title="Prototip (POO) – Romanian" lang="ro" hreflang="ro" data-title="Prototip (POO)" data-language-autonym="Română" data-language-local-name="Romanian" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%9F%D1%80%D0%BE%D1%82%D0%BE%D1%82%D0%B8%D0%BF%D0%BD%D0%BE%D0%B5_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5" title="Прототипное программирование – Russian" lang="ru" hreflang="ru" data-title="Прототипное программирование" data-language-autonym="Русский" data-language-local-name="Russian" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%D8%A8%DB%95%D8%B1%D9%86%D8%A7%D9%85%DB%95%D8%B3%D8%A7%D8%B2%DB%8C%DB%8C_%D9%BE%D8%B4%D8%AA%D8%A8%DB%95%D8%B3%D8%AA%D9%88%D9%88_%D8%A8%DB%95_%D9%BE%D8%B1%DB%86%D8%AA%DB%86%D8%AA%D8%A7%DB%8C%D9%BE" title="بەرنامەسازیی پشتبەستوو بە پرۆتۆتایپ – Central Kurdish" lang="ckb" hreflang="ckb" data-title="بەرنامەسازیی پشتبەستوو بە پرۆتۆتایپ" data-language-autonym="کوردی" data-language-local-name="Central Kurdish" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Prototyyppipohjainen_ohjelmointi" title="Prototyyppipohjainen ohjelmointi – Finnish" lang="fi" hreflang="fi" data-title="Prototyyppipohjainen ohjelmointi" data-language-autonym="Suomi" data-language-local-name="Finnish" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B9%82%E0%B8%9B%E0%B8%A3%E0%B9%81%E0%B8%81%E0%B8%A3%E0%B8%A1%E0%B9%81%E0%B8%9A%E0%B8%9A%E0%B9%82%E0%B8%9E%E0%B8%A3%E0%B9%82%E0%B8%97%E0%B9%84%E0%B8%97%E0%B8%9B%E0%B9%8C" title="การเขียนโปรแกรมแบบโพรโทไทป์ – Thai" lang="th" hreflang="th" data-title="การเขียนโปรแกรมแบบโพรโทไทป์" data-language-autonym="ไทย" data-language-local-name="Thai" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Prototip_tabanl%C4%B1_programlama" title="Prototip tabanlı programlama – Turkish" lang="tr" hreflang="tr" data-title="Prototip tabanlı programlama" data-language-autonym="Türkçe" data-language-local-name="Turkish" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%9F%D1%80%D0%BE%D1%82%D0%BE%D1%82%D0%B8%D0%BF%D0%BD%D0%B5_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D1%83%D0%B2%D0%B0%D0%BD%D0%BD%D1%8F" title="Прототипне програмування – Ukrainian" lang="uk" hreflang="uk" data-title="Прототипне програмування" data-language-autonym="Українська" data-language-local-name="Ukrainian" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/L%E1%BA%ADp_tr%C3%ACnh_d%E1%BB%B1a_tr%C3%AAn_nguy%C3%AAn_m%E1%BA%ABu" title="Lập trình dựa trên nguyên mẫu – Vietnamese" lang="vi" hreflang="vi" data-title="Lập trình dựa trên nguyên mẫu" data-language-autonym="Tiếng Việt" data-language-local-name="Vietnamese" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-zh-yue mw-list-item"><a href="https://zh-yue.wikipedia.org/wiki/%E5%9F%BA%E6%96%BC%E5%8E%9F%E5%9E%8B%E7%B7%A8%E7%A8%8B" title="基於原型編程 – Cantonese" lang="yue" hreflang="yue" data-title="基於原型編程" data-language-autonym="粵語" data-language-local-name="Cantonese" class="interlanguage-link-target"><span>粵語</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/%E5%9F%BA%E4%BA%8E%E5%8E%9F%E5%9E%8B%E7%BC%96%E7%A8%8B" title="基于原型编程 – Chinese" lang="zh" hreflang="zh" data-title="基于原型编程" data-language-autonym="中文" data-language-local-name="Chinese" class="interlanguage-link-target"><span>中文</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q180868#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="Namespaces"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-main" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Prototype-based_programming" title="View the content page [c]" accesskey="c"><span>Article</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Talk:Prototype-based_programming" rel="discussion" title="Discuss improvements to the content page [t]" accesskey="t"><span>Talk</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="Change language variant" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">English</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="Views"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Prototype-based_programming"><span>Read</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Prototype-based_programming&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Prototype-based_programming&action=history" title="Past revisions of this page [h]" accesskey="h"><span>View history</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="Tools" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">Tools</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">Tools</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">hide</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="More options" > <div class="vector-menu-heading"> Actions </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Prototype-based_programming"><span>Read</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Prototype-based_programming&action=edit" title="Edit this page [e]" accesskey="e"><span>Edit</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Prototype-based_programming&action=history"><span>View history</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> General </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:WhatLinksHere/Prototype-based_programming" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j"><span>What links here</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:RecentChangesLinked/Prototype-based_programming" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k"><span>Related changes</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u"><span>Upload file</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q"><span>Special pages</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Prototype-based_programming&oldid=1248049781" title="Permanent link to this revision of this page"><span>Permanent link</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Prototype-based_programming&action=info" title="More information about this page"><span>Page information</span></a></li><li id="t-cite" class="mw-list-item"><a href="/w/index.php?title=Special:CiteThisPage&page=Prototype-based_programming&id=1248049781&wpFormIdentifier=titleform" title="Information on how to cite this page"><span>Cite this page</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPrototype-based_programming"><span>Get shortened URL</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FPrototype-based_programming"><span>Download QR code</span></a></li> </ul> </div> </div> <div id="p-coll-print_export" class="vector-menu mw-portlet mw-portlet-coll-print_export" > <div class="vector-menu-heading"> Print/export </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="coll-download-as-rl" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&page=Prototype-based_programming&action=show-download-screen" title="Download this page as a PDF file"><span>Download as PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="/w/index.php?title=Prototype-based_programming&printable=yes" title="Printable version of this page [p]" accesskey="p"><span>Printable version</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> In other projects </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q180868" title="Structured data on this page hosted by Wikidata [g]" accesskey="g"><span>Wikidata item</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="Page tools"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="Appearance"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">Appearance</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">move to sidebar</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">hide</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">Style of object-oriented programming in which inheritance is based on reusing objects</div> <style data-mw-deduplicate="TemplateStyles:r1236090951">.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="/wiki/Prototype_pattern" title="Prototype pattern">Prototype pattern</a> or <a href="/wiki/Software_prototyping" title="Software prototyping">Software prototyping</a>.</div> <p><b>Prototype-based programming</b> is a style of <a href="/wiki/Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a> in which behavior reuse (known as <a href="/wiki/Inheritance_(programming)" class="mw-redirect" title="Inheritance (programming)">inheritance</a>) is performed via a process of reusing existing <a href="/wiki/Object_(programming)" class="mw-redirect" title="Object (programming)">objects</a> that serve as <a href="/wiki/Prototype" title="Prototype">prototypes</a>. This model can also be known as <i>prototypal</i>, <i>prototype-oriented,</i> <i>classless</i>, or <i>instance-based</i> programming. </p><p>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 <a href="/wiki/Class-based_programming" title="Class-based programming">class-based</a> paradigm, where a "fruit" <i>class</i> would be extended by a "banana" <i>class</i>. </p><p>The first prototype-based <a href="/wiki/Programming_language" title="Programming language">programming languages</a> were Director a.k.a. Ani (on top of <a href="/wiki/MacLisp" class="mw-redirect" title="MacLisp">MacLisp</a>) (1976-1979), and contemporaneously and not independently, ThingLab (on top of <a href="/wiki/Smalltalk" title="Smalltalk">Smalltalk</a>) (1977-1981), respective PhD projects by Kenneth Michael Kahn at MIT and Alan Hamilton Borning at Stanford (but working with Alan Kay at Xerox PARC). Borning introduced the word "prototype" in his TOPLAS 1981 paper. The first prototype-based programming language with more than one implementer or user was probably <a href="/wiki/T_(programming_language)" title="T (programming language)">Yale T Scheme</a> (1981-1984), though like Director and ThingLab initially, it just speaks of objects without classes. The language that made the name and notion of prototypes popular was <a href="/wiki/Self_(programming_language)" title="Self (programming language)">Self</a> (1985-1995), developed by <a href="/wiki/David_Ungar" title="David Ungar">David Ungar</a> and Randall Smith to research topics in object-oriented language design. </p><p>Since the late 1990s, the classless paradigm has grown increasingly popular. Some current prototype-oriented languages are <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> (and other <a href="/wiki/ECMAScript" title="ECMAScript">ECMAScript</a> implementations such as <a href="/wiki/JScript" title="JScript">JScript</a> and <a href="/wiki/Adobe_Flash" title="Adobe Flash">Flash</a>'s <a href="/wiki/ActionScript" title="ActionScript">ActionScript</a> 1.0), <a href="/wiki/Lua_(programming_language)" title="Lua (programming language)">Lua</a>, <a href="/wiki/Cecil_(programming_language)" title="Cecil (programming language)">Cecil</a>, <a href="/wiki/NewtonScript" title="NewtonScript">NewtonScript</a>, <a href="/wiki/Io_(programming_language)" title="Io (programming language)">Io</a>, <a href="/w/index.php?title=Ioke_(programming_language)&action=edit&redlink=1" class="new" title="Ioke (programming language) (page does not exist)">Ioke</a>, <a href="/wiki/MOO_(programming_language)" class="mw-redirect" title="MOO (programming language)">MOO</a>, <a href="/wiki/REBOL" class="mw-redirect" title="REBOL">REBOL</a> and <a href="/wiki/AutoHotkey" title="AutoHotkey">AHK</a>. </p><p>Since the 2010s, a new generation of languages with pure functional prototypes has appeared, that reduce OOP to its very core: <a href="/w/index.php?title=Jsonnet&action=edit&redlink=1" class="new" title="Jsonnet (page does not exist)">Jsonnet</a> is a <a href="/wiki/Type_system#Dynamic_type_checking_and_runtime_type_information" title="Type system">dynamic</a> <a href="/wiki/Lazy_evaluation" title="Lazy evaluation">lazy</a> <a href="/wiki/Purely_functional_programming" title="Purely functional programming">pure functional</a> language with a builtin prototype object system using <a href="/wiki/Mixin" title="Mixin">mixin</a> inheritance; <a href="/wiki/Nix_(package_manager)#Implementation" title="Nix (package manager)">Nix</a> is a <a href="/wiki/Type_system#Dynamic_type_checking_and_runtime_type_information" title="Type system">dynamic</a> <a href="/wiki/Lazy_evaluation" title="Lazy evaluation">lazy</a> <a href="/wiki/Purely_functional_programming" title="Purely functional programming">pure functional</a> language that builds an equivalent object system (Nix "extensions") in just two short function definitions (plus many other convenience functions). Both languages are used to define large distributed software configurations (Jsonnet being directly inspired by GCL, the Google Configuration Language, with which Google defines all its deployments, and has similar semantics though with dynamic binding of variables). Since then, other languages like <a href="/w/index.php?title=Gerbil_Scheme&action=edit&redlink=1" class="new" title="Gerbil Scheme (page does not exist)">Gerbil Scheme</a> have implemented pure functional lazy prototype systems based on similar principles. </p> <meta property="mw:PageProp/toc" /> <div class="mw-heading mw-heading2"><h2 id="Design_and_implementation">Design and implementation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=1" title="Edit section: Design and implementation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Etymologically, a "prototype" means "first cast" ("cast" in the sense of being manufactured). A prototype is a concrete thing, from which other objects can be created by copying and modifying. For example, the <a href="/wiki/International_Prototype_of_the_Kilogram" title="International Prototype of the Kilogram">International Prototype of the Kilogram</a> is an actual object that really exists, from which new kilogram-objects can be created by copying. In comparison, a "class" is an abstract thing, in which objects can belong. For example, all kilogram-objects are in the class of KilogramObject, which might be a subclass of MetricObject, and so on. </p><p>Prototypal inheritance in JavaScript is described by <a href="/wiki/Douglas_Crockford" title="Douglas Crockford">Douglas Crockford</a> as </p> <style data-mw-deduplicate="TemplateStyles:r1244412712">.mw-parser-output .templatequote{overflow:hidden;margin:1em 0;padding:0 32px}.mw-parser-output .templatequotecite{line-height:1.5em;text-align:left;margin-top:0}@media(min-width:500px){.mw-parser-output .templatequotecite{padding-left:1.6em}}</style><blockquote class="templatequote"><p>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?<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> </p></blockquote> <p>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 <a href="/wiki/Class_(programming)" class="mw-redirect" title="Class (programming)">classes</a>.<sup id="cite_ref-Taivalsaari_2-0" class="reference"><a href="#cite_note-Taivalsaari-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> Many prototype-based systems encourage the alteration of prototypes during <a href="/wiki/Run_time_(program_lifecycle_phase)" class="mw-redirect" title="Run time (program lifecycle phase)">run-time</a>, whereas only very few class-based object-oriented systems (such as the dynamic object-oriented system, <a href="/wiki/Common_Lisp" title="Common Lisp">Common Lisp</a>, <a href="/wiki/Dylan_(programming_language)" title="Dylan (programming language)">Dylan</a>, <a href="/wiki/Objective-C" title="Objective-C">Objective-C</a>, <a href="/wiki/Perl" title="Perl">Perl</a>, <a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a>, <a href="/wiki/Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a>, or <a href="/wiki/Smalltalk" title="Smalltalk">Smalltalk</a>) allow classes to be altered during the execution of a program. </p><p>Almost all prototype-based systems are based on <a href="/wiki/Interpreted_language" class="mw-redirect" title="Interpreted language">interpreted</a> and <a href="/wiki/Dynamically_typed" class="mw-redirect" title="Dynamically typed">dynamically typed</a> languages. Systems based on <a href="/wiki/Statically_typed" class="mw-redirect" title="Statically typed">statically typed</a> languages are technically feasible, however. The Omega language discussed in <i>Prototype-Based Programming</i><sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> is an example of such a system, though according to Omega's website even Omega is not exclusively static, but rather its "compiler may choose to use static binding where this is possible and may improve the efficiency of a program." </p> <div class="mw-heading mw-heading2"><h2 id="Object_construction">Object construction</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=2" title="Edit section: Object construction"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In prototype-based languages there are no explicit classes. Objects inherit directly from other objects through a prototype property. The prototype property is called <code>prototype</code> in <a href="/wiki/Self_(programming_language)" title="Self (programming language)">Self</a> and <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a>, or <code>proto</code> in <a href="/wiki/Io_(programming_language)" title="Io (programming language)">Io</a>. There are two methods of constructing new objects: <i><a href="/wiki/Ex_nihilo" class="mw-redirect" title="Ex nihilo">ex nihilo</a></i> ("from nothing") object creation or through <i>cloning</i> an existing object. The former is supported through some form of object <a href="/wiki/Literal_(computer_programming)" title="Literal (computer programming)">literal</a>, declarations where objects can be defined at runtime through special syntax such as <code>{...}</code> and passed directly to a variable. While most systems support a variety of cloning, <i>ex nihilo</i> object creation is not as prominent.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> </p><p>In class-based languages, a new instance is constructed through a class's <a href="/wiki/Constructor_(computer_science)" class="mw-redirect" title="Constructor (computer science)">constructor function</a>, a special function that reserves a block of memory for the object's members (properties and methods) and returns a reference to that block. An optional set of constructor <a href="/wiki/Parameter_(computer_science)" class="mw-redirect" title="Parameter (computer science)">arguments</a> can be passed to the function and are usually held in properties. The resulting instance will inherit all the methods and properties that were defined in the class, which acts as a kind of template from which similarly typed objects can be constructed. </p><p>Systems that support <i>ex nihilo</i> object creation allow new objects to be created from scratch without cloning from an existing prototype. Such systems provide a special syntax for specifying the properties and behaviors of new objects without referencing existing objects. In many prototype languages there exists a root object, often called <i>Object</i>, which is set as the default prototype for all other objects created in run-time and which carries commonly needed methods such as a <code>toString()</code> function to return a description of the object as a string. One useful aspect of <i>ex nihilo</i> object creation is to ensure that a new object's slot (properties and methods) names do not have <a href="/wiki/Namespace" title="Namespace">namespace</a> conflicts with the top-level <i>Object</i> object. (In the <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> language, one can do this by using a null prototype, i.e. <code>Object.create(null)</code>.) </p><p><i>Cloning</i> refers to a process whereby a new object is constructed by copying the behavior of an existing object (its prototype). The new object then carries all the qualities of the original. From this point on, the new object can be modified. In some systems the resulting child object maintains an explicit link (via <i><a href="/wiki/Delegation_(object-oriented_programming)" title="Delegation (object-oriented programming)">delegation</a></i> or <i><a href="/w/index.php?title=Resemblance_(programing)&action=edit&redlink=1" class="new" title="Resemblance (programing) (page does not exist)">resemblance</a></i>) to its prototype, and changes in the prototype cause corresponding changes to be apparent in its clone. Other systems, such as the <a href="/wiki/Forth_(programming_language)" title="Forth (programming language)">Forth</a>-like programming language <a href="/w/index.php?title=Kevo_(programming_language)&action=edit&redlink=1" class="new" title="Kevo (programming language) (page does not exist)">Kevo</a>, do not propagate change from the prototype in this fashion and instead follow a more <i>concatenative</i> model where changes in cloned objects do not automatically propagate across descendants.<sup id="cite_ref-Taivalsaari_2-1" class="reference"><a href="#cite_note-Taivalsaari-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="c1">// Example of true prototypal inheritance style in JavaScript.</span> <span class="c1">// Object creation using the literal object notation {}.</span> <span class="kd">const</span><span class="w"> </span><span class="nx">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nx">name</span><span class="o">:</span><span class="w"> </span><span class="s2">"foo"</span><span class="p">,</span><span class="w"> </span><span class="nx">one</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"> </span><span class="nx">two</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="w"> </span><span class="p">};</span> <span class="c1">// Another object.</span> <span class="kd">const</span><span class="w"> </span><span class="nx">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nx">two</span><span class="o">:</span><span class="w"> </span><span class="s2">"two"</span><span class="p">,</span><span class="w"> </span><span class="nx">three</span><span class="o">:</span><span class="w"> </span><span class="mf">3</span><span class="w"> </span><span class="p">};</span> <span class="c1">// Object.setPrototypeOf() is a method introduced in ECMAScript 2015.</span> <span class="c1">// For the sake of simplicity, let us pretend that the following</span> <span class="c1">// line works regardless of the engine used:</span> <span class="nb">Object</span><span class="p">.</span><span class="nx">setPrototypeOf</span><span class="p">(</span><span class="nx">bar</span><span class="p">,</span><span class="w"> </span><span class="nx">foo</span><span class="p">);</span><span class="w"> </span><span class="c1">// foo is now the prototype of bar.</span> <span class="c1">// If we try to access foo's properties from bar from now on, </span> <span class="c1">// we'll succeed. </span> <span class="nx">bar</span><span class="p">.</span><span class="nx">one</span><span class="p">;</span><span class="w"> </span><span class="c1">// Resolves to 1.</span> <span class="c1">// The child object's properties are also accessible.</span> <span class="nx">bar</span><span class="p">.</span><span class="nx">three</span><span class="p">;</span><span class="w"> </span><span class="c1">// Resolves to 3.</span> <span class="c1">// Own properties shadow prototype properties.</span> <span class="nx">bar</span><span class="p">.</span><span class="nx">two</span><span class="p">;</span><span class="w"> </span><span class="c1">// Resolves to "two".</span> <span class="nx">bar</span><span class="p">.</span><span class="nx">name</span><span class="p">;</span><span class="w"> </span><span class="c1">// Unaffected, resolves to "foo".</span> <span class="nx">foo</span><span class="p">.</span><span class="nx">name</span><span class="p">;</span><span class="w"> </span><span class="c1">// Resolves to "foo".</span> </pre></div> <p>For another example: </p> <div class="mw-highlight mw-highlight-lang-javascript mw-content-ltr" dir="ltr"><pre><span></span><span class="kd">const</span><span class="w"> </span><span class="nx">foo</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nx">one</span><span class="o">:</span><span class="w"> </span><span class="mf">1</span><span class="p">,</span><span class="w"> </span><span class="nx">two</span><span class="o">:</span><span class="w"> </span><span class="mf">2</span><span class="w"> </span><span class="p">};</span> <span class="c1">// bar.[[prototype]] = foo</span> <span class="kd">const</span><span class="w"> </span><span class="nx">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nb">Object</span><span class="p">.</span><span class="nx">create</span><span class="p">(</span><span class="nx">foo</span><span class="p">);</span> <span class="nx">bar</span><span class="p">.</span><span class="nx">three</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mf">3</span><span class="p">;</span> <span class="nx">bar</span><span class="p">.</span><span class="nx">one</span><span class="p">;</span><span class="w"> </span><span class="c1">// 1</span> <span class="nx">bar</span><span class="p">.</span><span class="nx">two</span><span class="p">;</span><span class="w"> </span><span class="c1">// 2</span> <span class="nx">bar</span><span class="p">.</span><span class="nx">three</span><span class="p">;</span><span class="w"> </span><span class="c1">// 3</span> </pre></div> <div class="mw-heading mw-heading2"><h2 id="Delegation">Delegation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=3" title="Edit section: Delegation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In prototype-based languages that use <i>delegation</i>, the language runtime is capable of <a href="/wiki/Dynamic_dispatch" title="Dynamic dispatch">dispatching</a> the correct method or finding the right piece of data simply by following a series of delegation pointers (from object to its prototype) until a match is found. All that is required to establish this behavior-sharing between objects is the delegation pointer. Unlike the relationship between class and instance in class-based object-oriented languages, the relationship between the prototype and its offshoots does not require that the child object have a memory or structural similarity to the prototype beyond this link. As such, the child object can continue to be modified and amended over time without rearranging the structure of its associated prototype as in class-based systems. It is also important to note that not only data, but also methods can be added or changed. For this reason, some prototype-based languages refer to both data and methods as "slots" or "members".<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="Sentence needs at least 1 citation. I've coded professionally in JS(all variants) & ActionScript for 4 years, and I've NEVER seen "slots" used this way in JS, and rarely in AS. E.g. see inconsistent/nonexistent usage in following: & . I'm calling 'Citation-needing', if not 'Dubious'. (January 2012)">citation needed</span></a></i>]</sup> </p> <div class="mw-heading mw-heading2"><h2 id="Concatenation">Concatenation</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=4" title="Edit section: Concatenation"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>In <i>concatenative</i> prototyping - the approach implemented by the Kevo programming language - there are no visible pointers or links to the original prototype from which an object is cloned. The prototype (parent) object is copied rather than linked to and there is no delegation. As a result, changes to the prototype will not be reflected in cloned objects.<sup id="cite_ref-Taivalsaar_5-0" class="reference"><a href="#cite_note-Taivalsaar-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> Incidentally, the <a href="/w/index.php?title=Cosmos_(programming_language)&action=edit&redlink=1" class="new" title="Cosmos (programming language) (page does not exist)">Cosmos programming language</a> achieves the same through the use of <a href="/wiki/Persistent_data_structure" title="Persistent data structure">persistent data structures</a>.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup> </p><p>The main conceptual difference under this arrangement is that changes made to a prototype object are not automatically propagated to clones. This may be seen as an advantage or disadvantage. (However, Kevo does provide additional primitives for publishing changes across sets of objects based on their similarity — so-called <i>family resemblances</i> or <i>clone family</i> mechanism<sup id="cite_ref-Taivalsaar_5-1" class="reference"><a href="#cite_note-Taivalsaar-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> — rather than through taxonomic origin, as is typical in the delegation model.) It is also sometimes claimed that delegation-based prototyping has an additional disadvantage in that changes to a child object may affect the later operation of the parent. However, this problem is not inherent to the delegation-based model and does not exist in delegation-based languages such as JavaScript, which ensure that changes to a child object are always recorded in the child object itself and never in parents (i.e. the child's value shadows the parent's value rather than changing the parent's value). </p><p>In simplistic implementations, concatenative prototyping will have faster member lookup than delegation-based prototyping (because there is no need to follow the chain of parent objects), but will conversely use more memory (because all slots are copied, rather than there being a single slot pointing to the parent object). More sophisticated implementations can avoid this problem, however, although trade-offs between speed and memory are required. For example, systems with concatenative prototyping can use a <a href="/wiki/Copy-on-write" title="Copy-on-write">copy-on-write</a> implementation to allow for behind-the-scenes data sharing — and such an approach is indeed followed by Kevo.<sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> Conversely, systems with delegation-based prototyping can use <a href="/wiki/Cache_(computing)" title="Cache (computing)">caching</a> to speed up data lookup. </p> <div class="mw-heading mw-heading2"><h2 id="Criticism">Criticism</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=5" title="Edit section: Criticism"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Advocates of class-based object models who criticize prototype-based systems often have concerns similar to the concerns that proponents of static type systems for programming languages have of dynamic type systems (see <a href="/wiki/Datatype" class="mw-redirect" title="Datatype">datatype</a>). Usually, such concerns involve <a href="/wiki/Correctness_(computer_science)" title="Correctness (computer science)">correctness</a>, <a href="/wiki/Type_safety" title="Type safety">safety</a>, <a href="/wiki/Predictability" title="Predictability">predictability</a>, <a href="/wiki/Algorithmic_efficiency" title="Algorithmic efficiency">efficiency</a> and programmer unfamiliarity. </p><p>On the first three points, classes are often seen as analogous to types (in most statically typed object-oriented languages they serve that role) and are proposed to provide contractual guarantees to their instances, and to users of their instances, that they will behave in some given fashion. </p><p>Regarding efficiency, declaring classes simplifies many <a href="/wiki/Compiler" title="Compiler">compiler</a> optimizations that allow developing efficient method and instance-variable lookup. For the <a href="/wiki/Self_(programming_language)" title="Self (programming language)">Self</a> language, much development time was spent on developing, compiling, and interpreting techniques to improve the performance of prototype-based systems versus class-based systems. </p><p>A common criticism made against prototype-based languages is that the community of <a href="/wiki/Software_developer" class="mw-redirect" title="Software developer">software developers</a> is unfamiliar with them, despite the popularity and market permeation of <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a>. However, knowledge about prototype-based systems is increasing with the proliferation of <a href="/wiki/JavaScript_framework" class="mw-redirect" title="JavaScript framework">JavaScript frameworks</a> and the complex use of JavaScript as the <a href="/wiki/World_Wide_Web" title="World Wide Web">World Wide Web</a> (Web) matures.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup><sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (March 2013)">citation needed</span></a></i>]</sup> ECMAScript 6 introduced classes as <a href="/wiki/Syntactic_sugar" title="Syntactic sugar">syntactic sugar</a> over JavaScript's existing prototype-based inheritance, providing an alternative way to create objects and manage inheritance.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup> </p> <div class="mw-heading mw-heading2"><h2 id="Languages_supporting_prototype-based_programming">Languages supporting prototype-based programming</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=6" title="Edit section: Languages supporting prototype-based programming"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1184024115">.mw-parser-output .div-col{margin-top:0.3em;column-width:30em}.mw-parser-output .div-col-small{font-size:90%}.mw-parser-output .div-col-rules{column-rule:1px solid #aaa}.mw-parser-output .div-col dl,.mw-parser-output .div-col ol,.mw-parser-output .div-col ul{margin-top:0}.mw-parser-output .div-col li,.mw-parser-output .div-col dd{page-break-inside:avoid;break-inside:avoid-column}</style><div class="div-col"> <ul><li><a href="/wiki/Actor-Based_Concurrent_Language" title="Actor-Based Concurrent Language">Actor-Based Concurrent Language</a> (ABCL): <a href="/wiki/ABCL/1" class="mw-redirect" title="ABCL/1">ABCL/1</a>, <a href="/wiki/ABCL/R" class="mw-redirect" title="ABCL/R">ABCL/R</a>, <a href="/wiki/ABCL/R2" class="mw-redirect" title="ABCL/R2">ABCL/R2</a>, <a href="/wiki/ABCL/c_plus" class="mw-redirect" title="ABCL/c plus">ABCL/c+</a></li> <li><a href="/wiki/Agora_(programming_language)" title="Agora (programming language)">Agora</a></li> <li><a href="/wiki/AutoHotkey" title="AutoHotkey">AutoHotkey</a></li> <li><a href="/wiki/Cecil_(programming_language)" title="Cecil (programming language)">Cecil</a> and <a href="/w/index.php?title=Diesel_(programming_language)&action=edit&redlink=1" class="new" title="Diesel (programming language) (page does not exist)">Diesel</a> of <a href="/wiki/Craig_Chambers" title="Craig Chambers">Craig Chambers</a></li> <li><a href="/w/index.php?title=ColdC&action=edit&redlink=1" class="new" title="ColdC (page does not exist)">ColdC</a></li> <li><a href="/w/index.php?title=COLA_(software_architecture)&action=edit&redlink=1" class="new" title="COLA (software architecture) (page does not exist)">COLA</a></li> <li><a href="/wiki/Common_Lisp" title="Common Lisp">Common Lisp</a></li> <li><a rel="nofollow" class="external text" href="http://www.cyan-lang.org/">Cyan</a></li> <li><a href="/wiki/ECMAScript" title="ECMAScript">ECMAScript</a> <ul><li><a href="/wiki/ActionScript" title="ActionScript">ActionScript</a> 1.0, used by <a href="/wiki/Adobe_Flash" title="Adobe Flash">Adobe Flash</a> and <a href="/wiki/Adobe_Flex" class="mw-redirect" title="Adobe Flex">Adobe Flex</a></li> <li><a href="/wiki/ECMAScript_for_XML" title="ECMAScript for XML">ECMAScript for XML</a> (E4X)</li> <li><a href="/wiki/JavaScript" title="JavaScript">JavaScript</a></li> <li><a href="/wiki/JScript" title="JScript">JScript</a></li> <li><a href="/wiki/TypeScript" title="TypeScript">TypeScript</a></li></ul></li> <li><a href="/wiki/Io_(programming_language)" title="Io (programming language)">Io</a></li> <li><a href="/w/index.php?title=Ioke_(programming_language)&action=edit&redlink=1" class="new" title="Ioke (programming language) (page does not exist)">Ioke</a></li> <li><a href="/w/index.php?title=Jsonnet_(programming_language)&action=edit&redlink=1" class="new" title="Jsonnet (programming language) (page does not exist)">Jsonnet</a></li> <li><a href="/wiki/Logtalk" title="Logtalk">Logtalk</a></li> <li><a href="/wiki/LPC_(programming_language)" class="mw-redirect" title="LPC (programming language)">LPC</a></li> <li><a href="/wiki/Lua_(programming_language)" title="Lua (programming language)">Lua</a></li> <li><a href="/w/index.php?title=M2000_Interpreter_(programming_language)&action=edit&redlink=1" class="new" title="M2000 Interpreter (programming language) (page does not exist)">M2000</a></li> <li><a href="/wiki/Maple_(software)" title="Maple (software)">Maple</a></li> <li><a href="/wiki/MOO_(programming_language)" class="mw-redirect" title="MOO (programming language)">MOO</a></li> <li><a href="/wiki/Neko_(programming_language)" class="mw-redirect" title="Neko (programming language)">Neko</a></li> <li><a href="/wiki/NewtonScript" title="NewtonScript">NewtonScript</a></li> <li><a href="/wiki/Nim_(programming_language)" title="Nim (programming language)">Nim</a></li> <li><a href="/wiki/Nix_package_manager" class="mw-redirect" title="Nix package manager">Nix</a></li> <li><a href="/wiki/Object_Lisp" title="Object Lisp">Object Lisp</a></li> <li><a href="/wiki/Obliq" title="Obliq">Obliq</a></li> <li><a href="/w/index.php?title=Omega_(programming_language)&action=edit&redlink=1" class="new" title="Omega (programming language) (page does not exist)">Omega</a></li> <li><a href="/wiki/OpenLaszlo" title="OpenLaszlo">OpenLaszlo</a></li> <li><a href="/wiki/Perl" title="Perl">Perl</a>, with the Class::Prototyped module</li> <li><a href="/wiki/Python_(programming_language)" title="Python (programming language)">Python</a> with <a rel="nofollow" class="external text" href="https://github.com/airportyh/prototype.py">prototype.py</a>.</li> <li><a href="/wiki/R_(programming_language)" title="R (programming language)">R</a>, with the proto package</li> <li><a href="/wiki/REBOL" class="mw-redirect" title="REBOL">REBOL</a></li> <li><a href="/wiki/Red_(programming_language)" title="Red (programming language)">Red (programming language)</a></li> <li><a href="/wiki/Ruby_(programming_language)" title="Ruby (programming language)">Ruby (programming language)</a></li> <li><a href="/wiki/Self_(programming_language)" title="Self (programming language)">Self</a></li> <li><a href="/w/index.php?title=Seph_(programming_language)&action=edit&redlink=1" class="new" title="Seph (programming language) (page does not exist)">Seph</a></li> <li><a href="/w/index.php?title=Slate_(programming_language)&action=edit&redlink=1" class="new" title="Slate (programming language) (page does not exist)">Slate (programming language)</a></li> <li><a href="/wiki/SmartFrog" title="SmartFrog">SmartFrog</a></li> <li><a href="/wiki/Snap!_(programming_language)" title="Snap! (programming language)">Snap!</a></li> <li><a href="/wiki/Etoys_(programming_language)" title="Etoys (programming language)">Etoys</a></li> <li><a href="/wiki/TADS" class="mw-redirect" title="TADS">TADS</a></li> <li><a href="/wiki/Tcl" title="Tcl">Tcl</a> with snit extension</li> <li><a href="/w/index.php?title=Umajin&action=edit&redlink=1" class="new" title="Umajin (page does not exist)">Umajin</a><sup id="cite_ref-10" class="reference"><a href="#cite_note-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup></li></ul> </div> <div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=7" title="Edit section: See also"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <ul><li><a href="/wiki/Class-based_programming" title="Class-based programming">Class-based programming</a> (contrast)</li> <li><a href="/wiki/Differential_inheritance" title="Differential inheritance">Differential inheritance</a></li> <li><a href="/wiki/Programming_paradigm" title="Programming paradigm">Programming paradigm</a></li></ul> <div class="mw-heading mw-heading2"><h2 id="References">References</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=8" title="Edit section: References"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1239543626">.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}</style><cite id="CITEREFCrockford" class="citation web cs1">Crockford, Douglas. <a rel="nofollow" class="external text" href="http://crockford.com/javascript/prototypal.html">"Prototypal Inheritance in JavaScript"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">22 June</span> 2021</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Prototypal+Inheritance+in+JavaScript&rft.aulast=Crockford&rft.aufirst=Douglas&rft_id=http%3A%2F%2Fcrockford.com%2Fjavascript%2Fprototypal.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-Taivalsaari-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-Taivalsaari_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Taivalsaari_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTaivalsaari1996" class="citation book cs1">Taivalsaari, Antero (1996). "Section 1.1". <i>Classes vs. Prototypes: Some Philosophical and Historical Observations</i>. pp. 44–50. <a href="/wiki/CiteSeerX_(identifier)" class="mw-redirect" title="CiteSeerX (identifier)">CiteSeerX</a> <span class="id-lock-free" title="Freely accessible"><a rel="nofollow" class="external text" href="https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.4713">10.1.1.56.4713</a></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Section+1.1&rft.btitle=Classes+vs.+Prototypes%3A+Some+Philosophical+and+Historical+Observations&rft.pages=44-50&rft.date=1996&rft_id=https%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fsummary%3Fdoi%3D10.1.1.56.4713%23id-name%3DCiteSeerX&rft.aulast=Taivalsaari&rft.aufirst=Antero&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFBlaschek" class="citation book cs1">Blaschek, Günther. "Section 2.8". <i>Omega: Statically Typed Prototypes</i>. p. 177.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Section+2.8&rft.btitle=Omega%3A+Statically+Typed+Prototypes&rft.pages=177&rft.aulast=Blaschek&rft.aufirst=G%C3%BCnther&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFDonyMalenfanBardou" class="citation book cs1">Dony, Christophe; Malenfan, Jacques; Bardou, Daniel. <a rel="nofollow" class="external text" href="http://www.lirmm.fr/~dony/postscript/proto-book.pdf">"Section 1.2"</a> <span class="cs1-format">(PDF)</span>. <i>Classifying Prototype-based Programming Languages</i>. p. 17.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=bookitem&rft.atitle=Section+1.2&rft.btitle=Classifying+Prototype-based+Programming+Languages&rft.pages=17&rft.aulast=Dony&rft.aufirst=Christophe&rft.au=Malenfan%2C+Jacques&rft.au=Bardou%2C+Daniel&rft_id=http%3A%2F%2Fwww.lirmm.fr%2F~dony%2Fpostscript%2Fproto-book.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-Taivalsaar-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-Taivalsaar_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Taivalsaar_5-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAntero_Taivalsaar2009" class="citation web cs1">Antero Taivalsaar (2009). <a rel="nofollow" class="external text" href="https://web.archive.org/web/20110813004939/http://lively.cs.tut.fi/publications/TR6-JavaScriptConcatenation-Taivalsaari.pdf">"Simplifying JavaScript with Concatenation-Based Prototype Inheritance"</a> <span class="cs1-format">(PDF)</span>. Tampere University of Technology. Archived from <a rel="nofollow" class="external text" href="http://lively.cs.tut.fi/publications/TR6-JavaScriptConcatenation-Taivalsaari.pdf">the original</a> <span class="cs1-format">(PDF)</span> on 2011-08-13<span class="reference-accessdate">. Retrieved <span class="nowrap">2015-03-11</span></span>. <q>Kevo implemented a pure concatenation-based object model in which new objects were created by copying and the namespaces of all the objects were always fully self-contained. … Furthermore, Kevo had an internal <i>clone family</i> mechanism that made it possible to track the "genealogy" of changes among groups of objects, so that changes to individual objects could be propagated to other objects when necessary.</q></cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Simplifying+JavaScript+with+Concatenation-Based+Prototype+Inheritance&rft.pub=Tampere+University+of+Technology&rft.date=2009&rft.au=Antero+Taivalsaar&rft_id=http%3A%2F%2Flively.cs.tut.fi%2Fpublications%2FTR6-JavaScriptConcatenation-Taivalsaari.pdf&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://github.com/cosmos-lang/cosmos-lang.github.io/wiki/Object%E2%80%90Oriented-Programming">"Object‐Oriented Programming"</a>. <i>GitHub</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-09-04</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=GitHub&rft.atitle=Object%E2%80%90Oriented+Programming&rft_id=https%3A%2F%2Fgithub.com%2Fcosmos-lang%2Fcosmos-lang.github.io%2Fwiki%2FObject%25E2%2580%2590Oriented-Programming&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFTaivalsaari1992" class="citation journal cs1">Taivalsaari, Antero (1992). "Kevo, a prototype-based object-oriented programming language based on concatenation and module operations". <i>Technical Report Report LACIR 92-02</i>. University of Victoria.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=Technical+Report+Report+LACIR+92-02&rft.atitle=Kevo%2C+a+prototype-based+object-oriented+programming+language+based+on+concatenation+and+module+operations&rft.date=1992&rft.aulast=Taivalsaari&rft.aufirst=Antero&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation news cs1"><a rel="nofollow" class="external text" href="https://alistapart.com/article/prototypal-object-oriented-programming-using-javascript">"Prototypal Object-Oriented Programming using JavaScript"</a>. <i>A List Apart</i>. 2016-04-26<span class="reference-accessdate">. Retrieved <span class="nowrap">2018-10-21</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.jtitle=A+List+Apart&rft.atitle=Prototypal+Object-Oriented+Programming+using+JavaScript&rft.date=2016-04-26&rft_id=https%3A%2F%2Falistapart.com%2Farticle%2Fprototypal-object-oriented-programming-using-javascript&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">"Classes"</a>. <i>JavaScript reference</i>. Mozilla Developer Network<span class="reference-accessdate">. Retrieved <span class="nowrap">9 February</span> 2016</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=JavaScript+reference&rft.atitle=Classes&rft_id=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FClasses&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></span> </li> <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text">Proprietary scripting language. <a rel="nofollow" class="external free" href="http://www.davidbrebner.com/?p=4">http://www.davidbrebner.com/?p=4</a> has some basic examples of use.</span> </li> </ol></div></div> <div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Prototype-based_programming&action=edit&section=9" title="Edit section: Further reading"><span>edit</span></a><span class="mw-editsection-bracket">]</span></span></div> <style data-mw-deduplicate="TemplateStyles:r1235681985">.mw-parser-output .side-box{margin:4px 0;box-sizing:border-box;border:1px solid #aaa;font-size:88%;line-height:1.25em;background-color:var(--background-color-interactive-subtle,#f8f9fa);display:flow-root}.mw-parser-output .side-box-abovebelow,.mw-parser-output .side-box-text{padding:0.25em 0.9em}.mw-parser-output .side-box-image{padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .side-box-imageright{padding:2px 0.9em 2px 0;text-align:center}@media(min-width:500px){.mw-parser-output .side-box-flex{display:flex;align-items:center}.mw-parser-output .side-box-text{flex:1;min-width:0}}@media(min-width:720px){.mw-parser-output .side-box{width:238px}.mw-parser-output .side-box-right{clear:right;float:right;margin-left:1em}.mw-parser-output .side-box-left{margin-right:1em}}</style><style data-mw-deduplicate="TemplateStyles:r1237033735">@media print{body.ns-0 .mw-parser-output .sistersitebox{display:none!important}}@media screen{html.skin-theme-clientpref-night .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .sistersitebox img[src*="Wiktionary-logo-en-v2.svg"]{background-color:white}}</style><div class="side-box side-box-right plainlinks sistersitebox"><style data-mw-deduplicate="TemplateStyles:r1126788409">.mw-parser-output .plainlist ol,.mw-parser-output .plainlist ul{line-height:inherit;list-style:none;margin:0;padding:0}.mw-parser-output .plainlist ol li,.mw-parser-output .plainlist ul li{margin-bottom:0}</style> <div class="side-box-flex"> <div class="side-box-image"><span class="noviewer" typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/40px-Wikibooks-logo-en-noslogan.svg.png" decoding="async" width="40" height="40" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/60px-Wikibooks-logo-en-noslogan.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/d/df/Wikibooks-logo-en-noslogan.svg/80px-Wikibooks-logo-en-noslogan.svg.png 2x" data-file-width="400" data-file-height="400" /></span></span></div> <div class="side-box-text plainlist">Wikibooks has a book on the topic of: <i><b><a href="https://en.wikibooks.org/wiki/Object_oriented_programming" class="extiw" title="wikibooks:Object oriented programming">Object oriented programming</a></b></i></div></div> </div> <ul><li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFAbadiLuca_Cardelli1996" class="citation book cs1"><a href="/wiki/Martin_Abadi" class="mw-redirect" title="Martin Abadi">Abadi, Martin</a>; <a href="/wiki/Luca_Cardelli" title="Luca Cardelli">Luca Cardelli</a> (1996). <i>A Theory of Objects</i>. Springer-Verlag. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/978-1-4612-6445-3" title="Special:BookSources/978-1-4612-6445-3"><bdi>978-1-4612-6445-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=A+Theory+of+Objects&rft.pub=Springer-Verlag&rft.date=1996&rft.isbn=978-1-4612-6445-3&rft.aulast=Abadi&rft.aufirst=Martin&rft.au=Luca+Cardelli&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></li> <li><a rel="nofollow" class="external text" href="http://www.laputan.org/reflection/warfare.html">Class Warfare: Classes vs. Prototypes</a>, by Brian Foote.</li> <li><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1238218222"><cite id="CITEREFNobleTaivalsaariMoore1999" class="citation book cs1">Noble, James; Taivalsaari, Antero; Moore, Ivan, eds. (1999). <i>Prototype-Based Programming: Concepts, Languages and Applications</i>. Springer-Verlag. <a href="/wiki/ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <a href="/wiki/Special:BookSources/981-4021-25-3" title="Special:BookSources/981-4021-25-3"><bdi>981-4021-25-3</bdi></a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Prototype-Based+Programming%3A+Concepts%2C+Languages+and+Applications&rft.pub=Springer-Verlag&rft.date=1999&rft.isbn=981-4021-25-3&rfr_id=info%3Asid%2Fen.wikipedia.org%3APrototype-based+programming" class="Z3988"></span></li> <li><a rel="nofollow" class="external text" href="http://web.media.mit.edu/~lieber/Lieberary/OOP/Delegation/Delegation.html">Using Prototypical Objects to Implement Shared Behavior in Object Oriented Systems</a>, by Henry Lieberman, 1986.</li></ul> <div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}</style><style data-mw-deduplicate="TemplateStyles:r1236075235">.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}</style></div><div role="navigation" class="navbox" aria-labelledby="Programming_paradigms_(Comparison_by_language)" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><style data-mw-deduplicate="TemplateStyles:r1239400231">.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}</style><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Programming_paradigms_navbox" title="Template:Programming paradigms navbox"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Programming_paradigms_navbox" title="Template talk:Programming paradigms navbox"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Programming_paradigms_navbox" title="Special:EditPage/Template:Programming paradigms navbox"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Programming_paradigms_(Comparison_by_language)" style="font-size:114%;margin:0 4em"><a href="/wiki/Programming_paradigm" title="Programming paradigm">Programming paradigms</a> (<a href="/wiki/Comparison_of_multi-paradigm_programming_languages" title="Comparison of multi-paradigm programming languages">Comparison by language</a>)</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Imperative_programming" title="Imperative programming">Imperative</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Structured_programming" title="Structured programming">Structured</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Jackson_structured_programming" title="Jackson structured programming">Jackson structures</a></li> <li><a href="/wiki/Block_(programming)" title="Block (programming)">Block-structured</a></li> <li><a href="/wiki/Modular_programming" title="Modular programming">Modular</a></li> <li><a href="/wiki/Non-structured_programming" title="Non-structured programming">Non-structured</a></li> <li><a href="/wiki/Procedural_programming" title="Procedural programming">Procedural</a></li> <li><a href="/wiki/Programming_in_the_large_and_programming_in_the_small" title="Programming in the large and programming in the small">Programming in the large and in the small</a></li> <li><a href="/wiki/Design_by_contract" title="Design by contract">Design by contract</a></li> <li><a href="/wiki/Invariant-based_programming" title="Invariant-based programming">Invariant-based</a></li> <li><a href="/wiki/Nested_function" title="Nested function">Nested function</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Object-oriented_programming" title="Object-oriented programming">Object-oriented</a><br />(<a href="/wiki/Comparison_of_programming_languages_(object-oriented_programming)" title="Comparison of programming languages (object-oriented programming)">comparison</a>, <a href="/wiki/List_of_object-oriented_programming_languages" title="List of object-oriented programming languages">list</a>)</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Class-based_programming" title="Class-based programming">Class-based</a>, <a class="mw-selflink selflink">Prototype-based</a>, <a href="/wiki/Object-based_language" title="Object-based language">Object-based</a></li> <li><a href="/wiki/Agent-oriented_programming" title="Agent-oriented programming">Agent</a></li> <li><a href="/wiki/Immutable_object" title="Immutable object">Immutable object</a></li> <li><a href="/wiki/Persistent_programming_language" title="Persistent programming language">Persistent</a></li> <li><a href="/wiki/Uniform_Function_Call_Syntax" title="Uniform Function Call Syntax">Uniform Function Call Syntax</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Declarative_programming" title="Declarative programming">Declarative</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Functional_programming" title="Functional programming">Functional</a><br />(<a href="/wiki/Comparison_of_functional_programming_languages" title="Comparison of functional programming languages">comparison</a>)</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Recursion_(computer_science)" title="Recursion (computer science)">Recursive</a></li> <li><a href="/wiki/Anonymous_function" title="Anonymous function">Anonymous function</a> (<a href="/wiki/Partial_application" title="Partial application">Partial application</a>)</li> <li><a href="/wiki/Higher-order_programming" title="Higher-order programming">Higher-order</a></li> <li><a href="/wiki/Purely_functional_programming" title="Purely functional programming">Purely functional</a></li> <li><a href="/wiki/Total_functional_programming" title="Total functional programming">Total</a></li> <li><a href="/wiki/Strict_programming_language" title="Strict programming language">Strict</a></li> <li><a href="/wiki/Generalized_algebraic_data_type" title="Generalized algebraic data type">GADTs</a></li> <li><a href="/wiki/Dependent_type" title="Dependent type">Dependent types</a></li> <li><a href="/wiki/Functional_logic_programming" title="Functional logic programming">Functional logic</a></li> <li><a href="/wiki/Tacit_programming" title="Tacit programming">Point-free style</a></li> <li><a href="/wiki/Expression-oriented_programming_language" title="Expression-oriented programming language">Expression-oriented</a></li> <li><a href="/wiki/Applicative_programming_language" title="Applicative programming language">Applicative</a>, <a href="/wiki/Concatenative_programming_language" title="Concatenative programming language">Concatenative</a></li> <li><a href="/wiki/Function-level_programming" title="Function-level programming">Function-level</a>, <a href="/wiki/Value-level_programming" title="Value-level programming">Value-level</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Dataflow_programming" title="Dataflow programming">Dataflow</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Flow-based_programming" title="Flow-based programming">Flow-based</a></li> <li><a href="/wiki/Reactive_programming" title="Reactive programming">Reactive</a> (<a href="/wiki/Functional_reactive_programming" title="Functional reactive programming">Functional reactive</a>)</li> <li><a href="/wiki/Signal_programming" class="mw-redirect" title="Signal programming">Signals</a></li> <li><a href="/wiki/Stream_processing" title="Stream processing">Streams</a></li> <li><a href="/wiki/Synchronous_programming_language" title="Synchronous programming language">Synchronous</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Logic_programming" title="Logic programming">Logic</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Abductive_logic_programming" title="Abductive logic programming">Abductive logic</a></li> <li><a href="/wiki/Answer_set_programming" title="Answer set programming">Answer set</a></li> <li><a href="/wiki/Constraint_programming" title="Constraint programming">Constraint</a> (<a href="/wiki/Constraint_logic_programming" title="Constraint logic programming">Constraint logic</a>)</li> <li><a href="/wiki/Inductive_logic_programming" title="Inductive logic programming">Inductive logic</a></li> <li><a href="/wiki/Nondeterministic_programming" title="Nondeterministic programming">Nondeterministic</a></li> <li><a href="/wiki/Ontology_language" title="Ontology language">Ontology</a></li> <li><a href="/wiki/Probabilistic_logic_programming" title="Probabilistic logic programming">Probabilistic logic</a></li> <li><a href="/wiki/Query_language" title="Query language">Query</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Domain-specific_language" title="Domain-specific language">DSL</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Algebraic_modeling_language" title="Algebraic modeling language">Algebraic modeling</a></li> <li><a href="/wiki/Array_programming" title="Array programming">Array</a></li> <li><a href="/wiki/Automata-based_programming" title="Automata-based programming">Automata-based</a> (<a href="/wiki/Action_language" title="Action language">Action</a>)</li> <li><a href="/wiki/Command_language" title="Command language">Command</a> (<a href="/wiki/Spacecraft_command_language" title="Spacecraft command language">Spacecraft</a>)</li> <li><a href="/wiki/Differentiable_programming" title="Differentiable programming">Differentiable</a></li> <li><a href="/wiki/End-user_development" title="End-user development">End-user</a></li> <li><a href="/wiki/Grammar-oriented_programming" title="Grammar-oriented programming">Grammar-oriented</a></li> <li><a href="/wiki/Interface_description_language" title="Interface description language">Interface description</a></li> <li><a href="/wiki/Language-oriented_programming" title="Language-oriented programming">Language-oriented</a></li> <li><a href="/wiki/List_comprehension" title="List comprehension">List comprehension</a></li> <li><a href="/wiki/Low-code_development_platform" title="Low-code development platform">Low-code</a></li> <li><a href="/wiki/Modeling_language" title="Modeling language">Modeling</a></li> <li><a href="/wiki/Natural-language_programming" title="Natural-language programming">Natural language</a></li> <li><a href="/wiki/Non-English-based_programming_languages" title="Non-English-based programming languages">Non-English-based</a></li> <li><a href="/wiki/Page_description_language" title="Page description language">Page description</a></li> <li><a href="/wiki/Pipeline_(software)" title="Pipeline (software)">Pipes</a> and <a href="/wiki/Filter_(software)" title="Filter (software)">filters</a></li> <li><a href="/wiki/Probabilistic_programming" title="Probabilistic programming">Probabilistic</a></li> <li><a href="/wiki/Quantum_programming" title="Quantum programming">Quantum</a></li> <li><a href="/wiki/Scientific_programming_language" title="Scientific programming language">Scientific</a></li> <li><a href="/wiki/Scripting_language" title="Scripting language">Scripting</a></li> <li><a href="/wiki/Set_theoretic_programming" title="Set theoretic programming">Set-theoretic</a></li> <li><a href="/wiki/Simulation_language" title="Simulation language">Simulation</a></li> <li><a href="/wiki/Stack-oriented_programming" title="Stack-oriented programming">Stack-based</a></li> <li><a href="/wiki/System_programming_language" title="System programming language">System</a></li> <li><a href="/wiki/Tactile_programming_language" title="Tactile programming language">Tactile</a></li> <li><a href="/wiki/Template_processor" title="Template processor">Templating</a></li> <li><a href="/wiki/Transformation_language" title="Transformation language">Transformation</a> (<a href="/wiki/Graph_rewriting" title="Graph rewriting">Graph rewriting</a>, <a href="/wiki/Production_system_(computer_science)" title="Production system (computer science)">Production</a>, <a href="/wiki/Pattern_matching" title="Pattern matching">Pattern</a>)</li> <li><a href="/wiki/Visual_programming_language" title="Visual programming language">Visual</a></li></ul> </div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Concurrent_computing" title="Concurrent computing">Concurrent</a>,<br /><a href="/wiki/Distributed_computing" title="Distributed computing">distributed</a>,<br /><a href="/wiki/Parallel_computing" title="Parallel computing">parallel</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Actor_model" title="Actor model">Actor-based</a></li> <li><a href="/wiki/Automatic_mutual_exclusion" title="Automatic mutual exclusion">Automatic mutual exclusion</a></li> <li><a href="/wiki/Choreographic_programming" title="Choreographic programming">Choreographic programming</a></li> <li><a href="/wiki/Concurrent_logic_programming" title="Concurrent logic programming">Concurrent logic</a> (<a href="/wiki/Concurrent_constraint_logic_programming" title="Concurrent constraint logic programming">Concurrent constraint logic</a>)</li> <li><a href="/wiki/Concurrent_object-oriented_programming" title="Concurrent object-oriented programming">Concurrent OO</a></li> <li><a href="/wiki/Macroprogramming" title="Macroprogramming">Macroprogramming</a></li> <li><a href="/wiki/Multitier_programming" title="Multitier programming">Multitier programming</a></li> <li><a href="/wiki/Organic_computing" title="Organic computing">Organic computing</a></li> <li><a href="/wiki/Parallel_programming_model" title="Parallel programming model">Parallel programming models</a></li> <li><a href="/wiki/Partitioned_global_address_space" title="Partitioned global address space">Partitioned global address space</a></li> <li><a href="/wiki/Process-oriented_programming" title="Process-oriented programming">Process-oriented</a></li> <li><a href="/wiki/Relativistic_programming" title="Relativistic programming">Relativistic programming</a></li> <li><a href="/wiki/Service-oriented_programming" title="Service-oriented programming">Service-oriented</a></li> <li><a href="/wiki/Structured_concurrency" title="Structured concurrency">Structured concurrency</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Metaprogramming" title="Metaprogramming">Metaprogramming</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Attribute-oriented_programming" title="Attribute-oriented programming">Attribute-oriented</a></li> <li><a href="/wiki/Automatic_programming" title="Automatic programming">Automatic</a> (<a href="/wiki/Inductive_programming" title="Inductive programming">Inductive</a>)</li> <li><a href="/wiki/Dynamic_programming_language" title="Dynamic programming language">Dynamic</a></li> <li><a href="/wiki/Extensible_programming" title="Extensible programming">Extensible</a></li> <li><a href="/wiki/Generic_programming" title="Generic programming">Generic</a></li> <li><a href="/wiki/Homoiconicity" title="Homoiconicity">Homoiconicity</a></li> <li><a href="/wiki/Interactive_programming" title="Interactive programming">Interactive</a></li> <li><a href="/wiki/Macro_(computer_science)" title="Macro (computer science)">Macro</a> (<a href="/wiki/Hygienic_macro" title="Hygienic macro">Hygienic</a>)</li> <li><a href="/wiki/Metalinguistic_abstraction" title="Metalinguistic abstraction">Metalinguistic abstraction</a></li> <li><a href="/wiki/Multi-stage_programming" title="Multi-stage programming">Multi-stage</a></li> <li><a href="/wiki/Program_synthesis" title="Program synthesis">Program synthesis</a> (<a href="/wiki/Bayesian_program_synthesis" title="Bayesian program synthesis">Bayesian</a>, <a href="/wiki/Inferential_programming" title="Inferential programming">Inferential</a>, <a href="/wiki/Programming_by_demonstration" title="Programming by demonstration">by demonstration</a>, <a href="/wiki/Programming_by_example" title="Programming by example">by example</a>)</li> <li><a href="/wiki/Reflective_programming" title="Reflective programming">Reflective</a></li> <li><a href="/wiki/Self-modifying_code" title="Self-modifying code">Self-modifying code</a></li> <li><a href="/wiki/Symbolic_programming" title="Symbolic programming">Symbolic</a></li> <li><a href="/wiki/Template_metaprogramming" title="Template metaprogramming">Template</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Separation_of_concerns" title="Separation of concerns">Separation<br />of concerns</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Aspect-oriented_programming" title="Aspect-oriented programming">Aspects</a></li> <li><a href="/wiki/Component-based_software_engineering" title="Component-based software engineering">Components</a></li> <li><a href="/wiki/Data-driven_programming" title="Data-driven programming">Data-driven</a></li> <li><a href="/wiki/Data-oriented_design" title="Data-oriented design">Data-oriented</a></li> <li><a href="/wiki/Event-driven_programming" title="Event-driven programming">Event-driven</a></li> <li><a href="/wiki/Feature-oriented_programming" title="Feature-oriented programming">Features</a></li> <li><a href="/wiki/Intentional_programming" title="Intentional programming">Intentional</a></li> <li><a href="/wiki/Literate_programming" title="Literate programming">Literate</a></li> <li><a href="/wiki/Role-oriented_programming" title="Role-oriented programming">Roles</a></li> <li><a href="/wiki/Subject-oriented_programming" title="Subject-oriented programming">Subjects</a></li></ul> </div></td></tr></tbody></table></div> <div class="navbox-styles"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1236075235"></div><div role="navigation" class="navbox" aria-labelledby="Types_of_programming_languages" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1129693374"><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1239400231"><div class="navbar plainlinks hlist navbar-mini"><ul><li class="nv-view"><a href="/wiki/Template:Types_of_programming_languages" title="Template:Types of programming languages"><abbr title="View this template">v</abbr></a></li><li class="nv-talk"><a href="/wiki/Template_talk:Types_of_programming_languages" title="Template talk:Types of programming languages"><abbr title="Discuss this template">t</abbr></a></li><li class="nv-edit"><a href="/wiki/Special:EditPage/Template:Types_of_programming_languages" title="Special:EditPage/Template:Types of programming languages"><abbr title="Edit this template">e</abbr></a></li></ul></div><div id="Types_of_programming_languages" style="font-size:114%;margin:0 4em"><a href="/wiki/Programming_paradigm" title="Programming paradigm">Types of programming languages</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Level</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/Machine_code" title="Machine code">Machine</a></li> <li><a href="/wiki/Assembly_language" title="Assembly language">Assembly</a></li> <li><a href="/wiki/Compiled_language" title="Compiled language">Compiled</a></li> <li><a href="/wiki/Interpreted_language" class="mw-redirect" title="Interpreted language">Interpreted</a></li></ul> <ul><li><a href="/wiki/Low-level_programming_language" title="Low-level programming language">Low-level</a></li> <li><a href="/wiki/High-level_programming_language" title="High-level programming language">High-level</a></li> <li><a href="/wiki/Very_high-level_programming_language" title="Very high-level programming language">Very high-level</a></li> <li><a href="/wiki/Esoteric_programming_language" title="Esoteric programming language">Esoteric</a></li></ul> </div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="/wiki/Programming_language_generations" title="Programming language generations">Generation</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"> <ul><li><a href="/wiki/First-generation_programming_language" title="First-generation programming language">First</a></li> <li><a href="/wiki/Second-generation_programming_language" title="Second-generation programming language">Second</a></li> <li><a href="/wiki/Third-generation_programming_language" title="Third-generation programming language">Third</a></li> <li><a href="/wiki/Fourth-generation_programming_language" title="Fourth-generation programming language">Fourth</a></li> <li><a href="/wiki/Fifth-generation_programming_language" title="Fifth-generation programming language">Fifth</a></li></ul> </div></td></tr></tbody></table></div> <!-- NewPP limit report Parsed by mw‐web.codfw.main‐f69cdc8f6‐6lc9b Cached time: 20241122141225 Cache expiry: 2592000 Reduced expiry: false Complications: [vary‐revision‐sha1, show‐toc] CPU time usage: 0.546 seconds Real time usage: 0.654 seconds Preprocessor visited node count: 1633/1000000 Post‐expand include size: 74135/2097152 bytes Template argument size: 4127/2097152 bytes Highest expansion depth: 13/100 Expensive parser function count: 7/500 Unstrip recursion depth: 1/20 Unstrip post‐expand size: 61254/5000000 bytes Lua time usage: 0.343/10.000 seconds Lua memory usage: 6382985/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 551.052 1 -total 32.65% 179.909 1 Template:Reflist 22.73% 125.240 4 Template:Cite_web 19.53% 107.619 4 Template:Navbox 18.82% 103.687 1 Template:Programming_paradigms_navbox 14.76% 81.309 1 Template:Short_description 14.35% 79.081 2 Template:Citation_needed 12.88% 70.999 2 Template:Fix 8.93% 49.206 2 Template:Pagetype 6.26% 34.475 2 Template:Delink --> <!-- Saved in parser cache with key enwiki:pcache:idhash:61003-0!canonical and timestamp 20241122141225 and revision id 1248049781. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Prototype-based_programming&oldid=1248049781">https://en.wikipedia.org/w/index.php?title=Prototype-based_programming&oldid=1248049781</a>"</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Prototype-based_programming" title="Category:Prototype-based programming">Prototype-based programming</a></li><li><a href="/wiki/Category:Object-oriented_programming" title="Category:Object-oriented programming">Object-oriented programming</a></li><li><a href="/wiki/Category:Programming_paradigms" title="Category:Programming paradigms">Programming paradigms</a></li><li><a href="/wiki/Category:Type_theory" title="Category:Type theory">Type theory</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:Articles_with_short_description" title="Category:Articles with short description">Articles with short description</a></li><li><a href="/wiki/Category:Short_description_is_different_from_Wikidata" title="Category:Short description is different from Wikidata">Short description is different from Wikidata</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_January_2012" title="Category:Articles with unsourced statements from January 2012">Articles with unsourced statements from January 2012</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_March_2013" title="Category:Articles with unsourced statements from March 2013">Articles with unsourced statements from March 2013</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> This page was last edited on 27 September 2024, at 11:05<span class="anonymous-show"> (UTC)</span>.</li> <li id="footer-info-copyright">Text is available under the <a href="/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License" title="Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License">Creative Commons Attribution-ShareAlike 4.0 License</a>; additional terms may apply. By using this site, you agree to the <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use" class="extiw" title="foundation:Special:MyLanguage/Policy:Terms of Use">Terms of Use</a> and <a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy" class="extiw" title="foundation:Special:MyLanguage/Policy:Privacy policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a rel="nofollow" class="external text" href="https://wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">Privacy policy</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:About">About Wikipedia</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:General_disclaimer">Disclaimers</a></li> <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">Code of Conduct</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">Developers</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/en.wikipedia.org">Statistics</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie statement</a></li> <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Prototype-based_programming&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-4dtrt","wgBackendResponseTime":151,"wgPageParseReport":{"limitreport":{"cputime":"0.546","walltime":"0.654","ppvisitednodes":{"value":1633,"limit":1000000},"postexpandincludesize":{"value":74135,"limit":2097152},"templateargumentsize":{"value":4127,"limit":2097152},"expansiondepth":{"value":13,"limit":100},"expensivefunctioncount":{"value":7,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":61254,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 551.052 1 -total"," 32.65% 179.909 1 Template:Reflist"," 22.73% 125.240 4 Template:Cite_web"," 19.53% 107.619 4 Template:Navbox"," 18.82% 103.687 1 Template:Programming_paradigms_navbox"," 14.76% 81.309 1 Template:Short_description"," 14.35% 79.081 2 Template:Citation_needed"," 12.88% 70.999 2 Template:Fix"," 8.93% 49.206 2 Template:Pagetype"," 6.26% 34.475 2 Template:Delink"]},"scribunto":{"limitreport-timeusage":{"value":"0.343","limit":"10.000"},"limitreport-memusage":{"value":6382985,"limit":52428800}},"cachereport":{"origin":"mw-web.codfw.main-f69cdc8f6-6lc9b","timestamp":"20241122141225","ttl":2592000,"transientcontent":false}}});});</script> <script type="application/ld+json">{"@context":"https:\/\/schema.org","@type":"Article","name":"Prototype-based programming","url":"https:\/\/en.wikipedia.org\/wiki\/Prototype-based_programming","sameAs":"http:\/\/www.wikidata.org\/entity\/Q180868","mainEntity":"http:\/\/www.wikidata.org\/entity\/Q180868","author":{"@type":"Organization","name":"Contributors to Wikimedia projects"},"publisher":{"@type":"Organization","name":"Wikimedia Foundation, Inc.","logo":{"@type":"ImageObject","url":"https:\/\/www.wikimedia.org\/static\/images\/wmf-hor-googpub.png"}},"datePublished":"2002-06-27T14:42:40Z","dateModified":"2024-09-27T11:05:29Z","headline":"style of object-oriented programming"}</script> </body> </html>