Closed caridy closed 8 years ago
/cc @dherman @wycats
I'm curious what happened to the descriptors? Why is the API all now exporting objects, no descriptors? It seems like it'd be handy to be handy to be able to getter/setters.
@rektide the descriptors we had before were not object property descriptors, they were export descriptors.
As for getter/setter, we have been drilling on the requirements, eventually we will provide that as a new feature, but that will require spec changes in 262 and discussions with implementers (which we have done some already), which will take longer.
We have decided to maintain the old API (export descriptors). Few thoughts:
Export
api has probably better ergonomics, but this is not intended for citizen developers, but low level (libraries and fw) code.Export
doesn't give us the edge we thought in terms of functionalities, everything could be replicated with the export descriptors in the same way you would get it done using declarative syntax.note: there are few editorial things from this PR that we will cherry-pick
@dherman did I missed anything else here?
Tagline: Formalizing a reflective API to create export bindings for Reflective Module Records.
Details
mutator
in favor of re-usable Export ObjectsReflect.Module.Export.let()
Reflect.Module.Export.var()
Reflect.Module.Export.const()
Reflect.Module.Export.from()
Usage
Re-exporing all from Module
Node Compat-Mode
Rendered HTML
https://rawgit.com/caridy/6430042924e0436918ea/raw/0f9e2224f1c29ac4449000f5350fdcb2ae439157/loader-pr129.html