Skip to content

new #65

Description

@71104

Provided as a global utility function (it will not become a keyword, it can be overridden by defining variables and parameters with the same name).

The use case is creating instances of objects provided by the native environment, e.g.:

new Error "something went wrong"

Or:

new Date 1440342320000

Note that associativity is left-most, i.e.:

(new Date) 1440342320000

The number of arguments that still need to be applied before returning the new instance is determined by the length of the constructor.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions