Allen, Kevin: I think the key question about private state and how it interacts 
with Anne's question is this.

Given a base class looking roughly like

```js
class HTMLElement extends Element {
  constructor(...) {
    super(...);
    // ...other stuff...
    this[Element.init]();
  }
}
```

then, will the following work?

```js
class CustomElement extends HTMLElement {
  [Element.init]() {
    // initialize private state
  }
}
```

Or would an actual constructor be required?

```js
class CustomElement extends HTMLElement {
  constructor(...args) {
    super(...args);
    // initialize private state
  }
}
```

Stated another way, which might be a bit stronger: will it be *lexically* 
required that private state initialization be within the constructor, or will 
it only be *temporally* required?

That question is, I think, what Anne is essentially asking when he asks about 
features that are "tied to constructors".
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to