Loader vs ES6 Classes
guybedford at gmail.com
Mon Aug 4 12:52:00 PDT 2014
I suppose the point is whether System can be subclassed itself, since that
is usually the starting point for a new loader as it is common to share the
base environment normalization, locate and fetch functions.
Currently, if System is set via the options hooks this isn't possible.
Note also that things like baseURL and the mapping table being created
through the constructor would also make sharing these easier.
If System were defined to be based on a class found at System.constructor
like this, things get a lot easier for that starting point.
On Monday, August 4, 2014, Jason Orendorff <jason.orendorff at gmail.com>
> On Sun, Aug 3, 2014 at 2:31 PM, Kevin Smith <zenparsing at gmail.com
> > I've often wondered why we aren't using inheritance to customize Loaders.
> > I'd be interested in the rationale.
> When I was working on Loaders, I modified the design so that inheritance
> That is, you can just subclass Loader and declare the methods you want
> to override, and the Loader will call those methods. It all works, as
> far as I can tell.
> I don't remember why we kept the options argument after that. I'm in
> favor of dropping it.
> es-discuss mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss