Russell Leggett wrote:
This is what Allen said about hoisting for this spec (Its been a long thread, not sure if you missed this.):

Thanks, I did catch up that far on the thread, but Allen reiterated the point he'd made months ago: you can't hoist *and initialize* the class declaration as you can a function declaration. Rather, class decl is like const decl. That was my point.

If "hoist" means only the binding, with a TDZ protecting use before in-evaluation-order init, then we agree.

If hoist means (as I used it, and even the words from Allen you quote do, viz "hoisting class definitions and immediately initializing them the way we do with functions just doesn't work...") moving the initiialization up too, then that misorders expression evaluation.

I'm pretty happy with the thread, and with Allen's strawman based on your suggestion and Dave's minimal classes work. Thanks!

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to