Sha256: 788b1d5058c90015705cc788173d63522324600aa83e99bb62ec70433253504a

Contents?: true

Size: 821 Bytes

Versions: 11

Compression:

Stored size: 821 Bytes

Contents

# Semantic differences between original ES6 and transpiled ES3

### Referenced (inside closure) before declaration
`defs.js` detects the vast majority of cases where a variable is referenced prior to
its declaration. The one case it cannot detect is the following:

```javascript
function printx() { console.log(x); }
printx(); // illegal
let x = 1;
printx(); // legal
```

The first call to `printx` is not legal because `x` hasn't been initialized at that point
of *time*, which is impossible to catch reliably with statical analysis.
`v8 --harmony` will detect and error on this via run-time checking. `defs.js` will
happily transpile this example (`let` => `var` and that's it), and the transpiled code
will print `undefined` on the first call to `printx`. This difference should be a very
minor problem in practice.

Version data entries

11 entries across 11 versions & 4 rubygems

Version Path
ilog-0.4.1 node_modules/defs/semantic-differences.md
ilog-0.4.0 node_modules/defs/semantic-differences.md
ilog-0.3.3 node_modules/defs/semantic-differences.md
xcodebuild-helper-1.2.5 externals/ios-sim-master/node_modules/defs/semantic-differences.md
xcodebuild-helper-1.2.3 externals/ios-sim-master/node_modules/defs/semantic-differences.md
es6_tilt-0.1.2 test/dummy/app/assets/javascripts/node_modules/defs/semantic-differences.md
es6_tilt-0.1.1 test/dummy/app/assets/javascripts/node_modules/defs/semantic-differences.md
es6_tilt-0.1.0 test/dummy/app/assets/javascripts/node_modules/defs/semantic-differences.md
gulp_assets-1.0.0.pre.5 template/node_modules/babel-core/node_modules/regenerator/node_modules/defs/semantic-differences.md
gulp_assets-1.0.0.pre.4 template/node_modules/babel-core/node_modules/regenerator/node_modules/defs/semantic-differences.md
gulp_assets-1.0.0.pre.3 template/node_modules/babel-core/node_modules/regenerator/node_modules/defs/semantic-differences.md