2012/9/11 David Bruant <[email protected]> > Le 11/09/2012 21:14, Tom Van Cutsem a écrit : > > (...) > > Note that in ES6, Reflect should probably be represented as a module > > instance, not as a global object. So then Handler.prototype would > > inherit from a module instance object. I don't see anything > > necessarily wrong with that, but I just want to point it out. > Is there a value to instanciate the Reflect module several times? So > far, it's only made of stateless methods, it would save memory to have > only one Reflect object in my opinion. >
The Reflect module is indeed stateless. And IIRC, module instances would be frozen anyway. I don't know the exact rules of module instance objects. Is it possible to reify the same module as multiple distinct instance objects in the same module loader context, or does the loader context cache a single instance object per module? Cheers, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

