GithubHelp home page GithubHelp logo

gibson042 / tc39-proposal-stricter-function-tostring Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tc39/proposal-stricter-function-tostring

0.0 2.0 0.0 26 KB

ECMAScript proposal for reducing Function.prototype.toString implementation flexibility

License: MIT License

HTML 100.00%

tc39-proposal-stricter-function-tostring's Introduction

Stricter Function.prototype.toString

Status

  • Champion(s): Richard Gibson
  • Stage: 0

Motivation

The Function.prototype.toString revision proposal and its needs-consensus followup commit went a long way in constraining the output of Function.prototype.toString for built-in functions and other functions for which no source text representation is available, but left some implementation flexibility with respect to whitespace and the contents of that output taking the place of a function name. But the entire ecosystem benefits from uniformity across implementations, so such flexibility does not seem beneficial. This proposal is an attempt to impose further constraints and corresponding predictability. We do not have a preference regarding any particular representation, and are willing to negotiate with implementations as necessary.

Description

If adopted, this proposal will reduce implementation flexibility regarding the output of Function.prototype.toString that is described by the NativeFunction production (e.g., for built-in functions, bound functions, and proxied functions). The scope specifically includes whitespace, tokens in between function and (, and the syntactically invalid body, and may expand to include the parameter list as well.

Implementations

There are no known implementations.

tc39-proposal-stricter-function-tostring's People

Contributors

gibson042 avatar

Watchers

James Cloos avatar  avatar

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.