> I don’t know how much of a factor this is in language design, but I think > this addition could have a nice side effect — it might help encourage > patterns that happen to play well with "tree shaking".
tree-shaking is incompatible with class-inheritance and meta-programming in javascript. it has negligible effect in practice, unless the majority of your code uses static-functions instead of classes. > On Dec 13, 2017, at 2:46 AM, Darien Valentine <[email protected]> wrote: > > > To me this seems like such a no-brainer that I'm actually surprised that > > this isn't possible already. > > I think it’s a no-brainer now that we’ve all been using import/export in > practice for a while, but it’s understandable that it might not have been > obvious on the first pass. > > I don’t know how much of a factor this is in language design, but I think > this addition could have a nice side effect — it might help encourage > patterns that happen to play well with "tree shaking". > > I bet this would fly if proposed! > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

