-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class.new(...args) vs Class.create(...args) #86
Comments
@WebReflection you can just fork it and provide samplels and actuall impl of it |
I'm afraid I am going on vacation next couple of weeks and I have other issues to tackle internally (before that) ... but if this is the answer, I will eventually try to do what you suggested, although it will surely take a long while. |
@WebReflection im not a contributor and not an author. |
@ParadiseFallen oh no, we clarified that aspect already #85 (comment) |
@WebReflection fine |
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 usesClass.create()
instead of the more acknowledged and developer friendly (because it's backed by JSnew
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 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!The text was updated successfully, but these errors were encountered: