Domenic Denicola wrote:
Just to contribute to this... er... fun-thread...

My team uses the closure pattern for our "classes" (i.e. no prototype
methods at all), since we value encapsulation. I can't imagine we're alone.

So any class solution that doesn't fully incorporate private names (e.g.
by making them awkward via manual Name.create(), etc.) will leave that
audience behind, still using closures and ignoring any new class sugar.

Is the current (the last winning alternative afaicr) state good enough for you?

In a few words:

  private x,y;

will be desugared to

  const x = Name.create(), y = Name.create();

So you would need to write your code as:

module ... {
  ...
  private foo, bar;
  ...
  class Alpha .... {
    ... uses names foo, bar in constructor and methods
  }

  ... maybe use the same name in subsequent classes and functions
}

Herby
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to