Open
Description
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
Labels
No labels