Giter Club home page Giter Club logo

Comments (5)

kriskowal avatar kriskowal commented on September 25, 2024

I think it would be unwise to use "prototype" as a verb in this context.

I actually don’t like "subtype", but I’m at a loss for words. "create" in the sense of Object.create means to create an object that "inherits" "prototypically" from a given "prototype" and for convenience may extend the new object with some properties (or "prototypally", but why use a word that’s not in the dictionary when there’s a proper conjugation that serves the purpose). Creation is a tool for both "instantiation" and "deriving" new types and the issue of defining properties is orthogonal. It just happens that in Montage, we conventionally restrict ourselves to defining new properties when we "derive" new types.

The problem with "create" isn’t merely with terminology, but the need for terminology to distinguish proper usage, rather than distinguishing proper usage with syntax. See #37

from montage.

tstatler avatar tstatler commented on September 25, 2024

Agreed, prototype should not be used as a verb here.

from montage.

francoisfrisch avatar francoisfrisch commented on September 25, 2024

@kriskowal you can lead this thread

from montage.

kriskowal avatar kriskowal commented on September 25, 2024
  • "prototype" (noun) as used in JavaScript, a prototype is an object that shares its interface through "prototypical inheritance". Both instances and types have prototypes.
  • "create" (verb) to create a new prototype from a base prototype. Creation is used for both "type inheritance" and "instantiation".
  • "(Montage) type" (noun) a prototype for the purpose of inheriting a common interface. Montage types are always defined by rich property descriptors which extend ES5 property descriptors but have slightly different defaults. Creating descriptors has some overhead, which is acceptable for types because they are never hot code.
  • "instance" (noun) a prototype for the purpose of doing work. The properties of an instance have state which must not be shared by other objects. An instance must not be used as a type.
  • "inherit" (verb) to create a new type, based on another type. Types can be used to create instances or types. Types should only have state if it is acceptable for all instances of that type and its descendant types to share that state. Shared state cannot be serialized.
  • "instantiate" (verb) to create a new instance from a type.
  • "initialize" (verb) to set up an initial, consistent state for instance. Objects that have been deserialized are not initialized: it’s assumed that they were serialized with a consistent internal state.
  • "state" (noun) the owned properties of an instance. Some state can be serialized and deserialized.

from montage.

kriskowal avatar kriskowal commented on September 25, 2024

Please close.

from montage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.