8000 Class.new(...args) vs Class.create(...args) · Issue #86 · ceifa/wasmoon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Class.new(...args) vs Class.create(...args) #86
Open
@WebReflection

Description

@WebReflection

There's a lengthy discussion in TC39 around classes instantiations and I've realized wasmoon wraps these as arrow function which can't ever be used with new in general, but it also uses Class.create() instead of the more acknowledged and developer friendly (because it's backed by JS new syntax) Class.new(...args) pattern.

Beside the TC39 discussion though, it would be very community friendly if all interpreters with instantiation ability would follow a common pattern such as Class.new(...args) is, compared with .create(...) in wasmoon or pm.new(pm.Thing)(...args) in PythonMonkey.

As summary: please consider offering .new(...args) convention to instantiate JS objects within the wasmoon runtime, thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0