Stop Writing JavaScript Compilers, Make Macros Instead
I'd be afraid of inheriting any codebase that made extensive use of these JS macros.<p>You really have no idea what this is doing (the canonical example from sweetjs.org):<p><pre><code>  class Person {
    constructor(name) {
      this.name = name;
    }

    say(msg) {
      console.log(this.name + " says: " + msg);
    }
  }
</code></pre>
It's not javascript -- it's your own made up "language" of macros.<p>I do believe with a steady hand this could lead to some great things, but the example on sweetjs.org seems rather heavy handed. Having different `class` macro definitions between codebases that use sweet.js will devolve into madness.