You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, you offer us let and const support. Sadly, the only way to use it is to target es6.
Why don't implement the logic in the compiler itself like others es6 features (class, arrow functions).
Does the reason is technical ?
The text was updated successfully, but these errors were encountered:
There actually are semantic differences with let/const that prevent us from just performing compile-time verification and turning them into vars. For example, take the following two code samples:
The only difference is the use of let vs var. The latter is a notorious example of how closure capture can be counter-intuitive in ECMAScript, where you'll just get:
5
5
5
5
5
On the other hand, the let example will give you the "expected" behavior:
0
1
2
3
4
We could support it, but the codegen isn't always the prettiest, and causes a perf-impact. We'd like to first get ES6 parity before we prioritize down-level support.
Recently, you offer us
let
andconst
support. Sadly, the only way to use it is to target es6.Why don't implement the logic in the compiler itself like others es6 features (class, arrow functions).
Does the reason is technical ?
The text was updated successfully, but these errors were encountered: