Ryosuke Niwa wrote:
Having said that, TDZ was introduced to give "let", "const", and alike a sensible behavior as I understand it. Since "this" was never defined by "let" or "const", it seems a little arbitrary and inconsistent to make "this" TDZ only inside a derived class's constructor.
It's not arbitrary as in a fair coin toss -- it's intentionally biased to catch errors. Using null or undefined would find fewer errors.
I'm wondering whether other implementors feel the same pain. I mailed a few V8 folks asking them, maybe they'll weigh in.
/be _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

