Why are ES6 classes not hoisted?
<p>Since ES6 classes are just a <em>syntactical sugar over JavaScript's existing prototype-based inheritance</em> <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes" rel="noreferrer">[1]</a> it would (IMO) make sense to hoist it's definition:</p>

<pre><code>var foo = new Foo(1, 2); //this works

function Foo(x, y) {
   this.x = x;
   this.y = y;
}
</code></pre>

<p>But the following won't work:</p>

<pre><code>var foo = new Foo(1, 2); //ReferenceError

class Foo {
   constructor(x, y) {
      this.x = x;
      this.y = y;
   }
}
</code></pre>

<p>Why are ES6 classes not hoisted?</p>