title: ES6: call class constructor without new keyword
body: <p>Given a simple class</p>
  
  <pre><code>class Foo {
    constructor(x) {
      if (!(this instanceof Foo)) return new Foo(x);
      this.x = x;
    }
    hello() {
      return `hello ${this.x}`;
    }
  }
  </code></pre>
  
  <p>Is it possible to call the class constructor without the <code>new</code> keyword?</p>
  
  <p>Usage should allow</p>
  
  <pre><code>(new Foo("world")).hello(); // "hello world"
  </code></pre>
  
  <p>Or</p>
  
  <pre><code>Foo("world").hello();       // "hello world"
  </code></pre>
  
  <p>But the latter fails with</p>
  
  <pre class="lang-none prettyprint-override"><code>Cannot call a class as a function
  </code></pre>