2ality.com/2011/06/prototypes-as-classes.html

Preview meta tags from the 2ality.com website.

Linked Hostnames

10
  • General Meta Tags

    6
    • title
      Prototypes as classes – an introduction to JavaScript inheritance
    • charset
      utf-8
    • viewport
      width=device-width
    • description
      Updates – read first: [2011-11-04] “Myth: JavaScript needs classes” introduces a more concise name for “prototypes as classes”: object exemplars. An exemplar is a factory for instances, constructors are function exemplars. [2012-01-08] “JavaScript inheritance by example” is a more hands-on introduction, complementing this post. [2012-07-29] Classes have been accepted for ECMAScript.next. [2012-10-03] Since this article has been written, it was decided that ECMAScript will have the special property __proto__ instead of the <| operator. JavaScript’s prototypal inheritance is hard to understand, especially for people coming from other languages that are used to classes. This post explains that it does not have to be that way: The proposal “prototypes as classes” is a simplification of classes and inheritance in JavaScript. It might become part of ECMAScript.next, a.k.a. “the next version of JavaScript” (after ECMAScript 5). But there is also a library that allows you to use its features in today’s JavaScript. What’s intriguing about prototypes as classes is that they aren’t a radical departure from current practices, but rather a clarification of them. Incidentally, this post is also a good introduction to JavaScript inheritance, because the basics are easier to understand with prototypes as classes.
    • og:title
      Prototypes as classes – an introduction to JavaScript inheritance
  • Twitter Meta Tags

    1
    • twitter:card
      summary
  • Link Tags

    5
    • alternate
      https://2ality.com/feeds/posts.atom
    • apple-touch-icon
      ../../img/favicons/2ality-favicon-180x180.png
    • icon
      ../../img/favicons/2ality-favicon-opaque.svg
    • mask-icon
      ../../img/favicons/2ality-favicon-transparent.svg
    • stylesheet
      ../../assets/main.css

Links

24