Giter Site home page Giter Site logo

Comments (2)

bathos avatar bathos commented on June 16, 2024 2

I think “as if from ES null” covers it unambiguously and that the “or an object” part would be more misleading than helpful even if “corrected.” There’s a lot more than just Object.prototype which could impact conversion behavior. Unlike conversion from ES object, conversion from ES null has no observable steps. As there are no ES-observable steps when creating a default dictionary, it should probably not mention object conversion at all.

from webidl.

domenic avatar domenic commented on June 16, 2024 1

The intent of that section, if I recall, was that the {} is a purely syntactic decoration that makes it clearer for readers. (See #602.) The sentence you quote was not meant to be a definition, but instead a statement about what that syntactic decoration "represents". In this context, "represents" means "how you should think about it when reading", not anything normative.

Note that "object with no properties" is mean to indicate an object with no properties, not an object which inherits its properties from Object.prototype.

Some more background can be found by digging through #750 and the linked threads.

That said, it seems like there is some gap in the normative requirements here, which fails to translate the default values {} and [] into actual ECMAScript values, of the type that you could put into the overload resolution algorithm's outputs. (Arguably, it's also not very rigorous to take the Web IDL token false and translate that into the ECMAScript boolean value false, either.) We should probably have an explicit procedure that does that conversion between value spaces.

from webidl.

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.