Class double-bind

Claude Pache claude.pache at gmail.com
Tue Mar 3 11:33:31 UTC 2015


A simple solution is to make:

    class Foo { /* ... */ }

equivalent to:

    const Foo = class Foo { /* ... */ }

instead of the equivalent desugaring with `let`. That way, anyone who want to play with a same-named external binding must be explicit about their intention:

    let Foo = class { /* ... */ } // one binding
    let Foo = class Foo { /* .... */ } // two bindings

—Claude


More information about the es-discuss mailing list