Git Product home page Git Product logo

Comments (9)

anba avatar anba commented on May 22, 2024

You could use the same language as in 9.4.4 Arguments Exotic Objects, for example:

Return the result of calling the default ordinary object [[SetPrototypeOf]] internal method (9.1.2) on O passing V as the argument.

[[Get]], [[Set]] and [[Delete]] for arguments objects use this wording to call the ordinary internal methods.

from ecma262.

domenic avatar domenic commented on May 22, 2024

I guess that covers it; thanks!

from ecma262.

annevk avatar annevk commented on May 22, 2024

Is there a reason ECMAScript uses both patterns?

from ecma262.

bterlson avatar bterlson commented on May 22, 2024

@annevk which patterns are you referring to?

from ecma262.

annevk avatar annevk commented on May 22, 2024

What @anba mentioned and using OrdinaryInternalMethod abstract operations.

from ecma262.

annevk avatar annevk commented on May 22, 2024

Also, if I say use "default ordinary object [[Get]] internal method", does that mean the [[GetOwnProperty]] call it does (and similar ones) are the normal non-overridden variants as well?

from ecma262.

allenwb avatar allenwb commented on May 22, 2024

@annevk
Choice of how to do this is mostly a judgement call by the editor. delegating to OrdinaryX abstraction operation adds a level of indirection that make the normal case harder to read/understand. Using ""default ordinary object..." (and note a section reference is always included) only adds complexity at the "call site".

If you say "call the default ordinary object [[Get]] internal method" (and you need to include a section reference) you mean exactly and only that. If you say "call the [[GetOwnProperty internal method of obj" (or just say obj.[GetOwnProperty] ) you are going throw the meta-level dynamic dispatch to the specific [[GetOwnPrperty]] associated with obj.

from ecma262.

annevk avatar annevk commented on May 22, 2024

It's still not clear that if you say "call the default ordinary object [[Get]] internal method" that means that the internal methods that that algorithm invokes, are also the default ordinary ones. At least not to me.

from ecma262.

allenwb avatar allenwb commented on May 22, 2024

@annevk It is just referring to the internal methods specified in 9.1.

Arguably, the word "default" is redundant as any object that does not use the definitions in 9.1 is not an "ordinary object".

from ecma262.

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.