Giter Site home page Giter Site logo

Comments (5)

balupton avatar balupton commented on July 17, 2024

Let's go all in with loose mode, as apparently it is faster due to inherent V8 optimisations... if it causes problems we'll switch to selective opt-in. Any objections?

from base.

balupton avatar balupton commented on July 17, 2024

Turns out there are many issues with going all in.

Discussion on slack arose: https://babeljs.slack.com/archives/plugins/p1453108840000636

Example issue:

Essentially:

Yeah. It is all really confusing. As essentially the differences between the modes (loose and no loose), both take the same input code, but can actually produce different output results, which may or may not go detected. Saying it just about performance, or about how the code is done, is misleading, as unfortunately, the situation seems to be - use loose mode for performant ES5 output for browsers like IE8 however ES6 features and input may fail secretly on you - or use ESNext features like for-of without loose mode, and have things fail secretly for you in ES5 environments like IE8 - either way there seems to be dragons in cross-browser use cases.
https://babeljs.slack.com/archives/plugins/p1453169847000667

To just continue on from my last paragraph… It is quite a dilemma for me, as my libraries are used in all sorts of environments, modern and old, for instance, mostly node v5 environments, however Meteor users (who still run node 0.10) encounter the “missing Symbol” error of non-loose babel compilation of for-of loops on arrays - and it seems that with the current options, I either need to compile to code that will work fine for Meteor users on node 0.10 and then have secret failures with integration with ESNext code, or to compile to ESNext code and tell Meteor and older-browser users, tough luck
https://babeljs.slack.com/archives/plugins/p1453170370000679

The solution could be to:

  1. Publish esnext version with esnextguardian fallback to normal es2015 babel code (no loose mode)
  2. Inform developers coding for older environments (e.g. node 0.10 and IE8 users) that they will need to include the babel polyfill or the babel runtime

from base.

balupton avatar balupton commented on July 17, 2024

@johnthepink can I get your opinion on whether or not including the babel polyfill or the babel runtime for your meteor app is good enough a solution? /cc bevry/cson#69

from base.

johnthepink avatar johnthepink commented on July 17, 2024

@balupton We are currently good with our fork. We don't want to stand in the way of the project moving forward. Meteor is hopefully going to upgrade node versions soon, and until then we will just use our fork.

That being said, if you get babel in there somehow, we should be able to use it. Thanks!

from base.

balupton avatar balupton commented on July 17, 2024

Will drop 0.10 support. It will be up to the user to include the babel polyfill for environments less than node 0.12.

from base.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.