Comments (5)
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.
Turns out there are many issues with going all in.
Discussion on slack arose: https://babeljs.slack.com/archives/plugins/p1453108840000636
Example issue:
- http://goo.gl/1k0Sm1 by jaawerth on babel's slack is one example / https://babeljs.slack.com/archives/plugins/p1453141509000639
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/p1453169847000667To 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:
- Publish esnext version with esnextguardian fallback to normal es2015 babel code (no loose mode)
- 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.
@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.
@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.
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)
- Your thoughts on having a generic npm run-script marco? HOT 3
- Should we add linting files? HOT 1
- Remove Node 0.8 from .travis.yml HOT 3
- errno ENOENT while installing gulp-replace-task in project HOT 1
- Rename coffeelint.json to coffeescript.json HOT 1
- Add nakefile guide
- When jspm supports esnext, update package.json to point jspm to esnext HOT 1
- Coding Style HOT 2
- Use editions HOT 6
- nakefiles to npm scripts only HOT 1
- Add source clear to prepare step HOT 1
- provide typescript option HOT 1
- .docpad.db HOT 1
- Somehow make updating base files more streamlined HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from base.