News for hackers. Stuff that matters.
Re:V8 release v7.2 by syspec on Tuesday December 18, 2018 @03:08PM (#18710069)
This example seems like something you shouldn't be able to do. Now you have 2 private '#x' properties with unique values. It's very surprising.

Intuitively, you would expect the subclass to essentially be saying "my version of this variable is equal to 200, not 100". Then both calls should return the same result (200)

Re:V8 release v7.2 by __ryan__ on Wednesday December 19, 2018 @08:35AM (#18715453)
The spec (and the committee) has defined "private fields" to mean that anything outside of the defining class (including subclasses) should have no knowledge of them. If your subclass needs to know about the property, make it "soft private" by prefixing it with _.
Re:V8 release v7.2 by throwaway427 on Tuesday December 18, 2018 @05:03PM (#18711002)
Another comment in this thread noted this is how Java works. I very much agree with you, but I guess there are different interpretations of how this should behave.