1 of 4

Class fields status update

Daniel Ehrenberg

Igalia

In partnership with Bloomberg

TC39 September 2017

2 of 4

Small spec changes

3 of 4

ASI?

  • Keeps coming up in the bug tracker
  • Should we use normal ASI rules?
  • Proposition: ASI is bad
  • Proposition: ASI is weirder than normal in class bodies because they have different things:
    • Need ; after field named get, set, static
    • Need ; after field with initializer before generator, computed property key
    • New class contextual keywords need [no LineTerminator here]
    • Different from statement ASI!

4 of 4

Implementation status

  • Spec
  • V8 implementation in progress PR
  • JSC implementation in progress PR
  • Babel supports public fields with new current semantics; private fields in progress PR
  • Test262 tests in progress PR