3 ms·
> is such an elegant approach In theory more than practice. For example if you use array destructuring (`[x, y] = something`) and Babel cannot verify that `som
by orf 10y ago
> is such an elegant approach
In theory more than practice. For example if you use array destructuring (`[x, y] = something`) and Babel cannot verify that `something` is always an array it inserts a 664 character function that handles generators and other things. That adds performance and size overhead (grep for _slicedToArray in your compiled js files), when all you really want is `x = something[0]...`
https://babeljs.io/repl/#?babili=false&evaluate=true&lineWrap=false&presets=es2015%2Creact%2Cstage-2&targets=&browsers=&builtIns=false&debug=false&code=function%20a(something)%7B%0A%20const%20%5Bx%2Cy%5D%20%3D%20something%3B%0A%7D%0A https://babeljs.io/repl/#?babili=false&evaluate=true&lineWra...