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!
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
newin general, but it also usesClass.create()instead of the more acknowledged and developer friendly (because it's backed by JSnewsyntax)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 orpm.new(pm.Thing)(...args)in PythonMonkey.As summary: please consider offering
.new(...args)convention to instantiate JS objects within the wasmoon runtime, thank you!