Isn't it still in stage 3!
https://github.com/tc39/proposals
-
-
-
Correct. Stage 3 is when proposals start shipping. Stage 4 requires multiple shipping implementations: https://tc39.github.io/process-document/ …
- 2 more replies
New conversation -
-
-
what about FakeMath['
#totallyRandomNumber']
-
That would attempt to access a regular property with that name, not the private field. So in this case, it would result in `undefined`.
End of conversation
New conversation -
-
-
Loved the article, thanks! So just to be sure: declaring a public class field saves us from having lots of http://this.foo = something in our constructors? (parenthetically, I'd love to get rid of "this" entirely! Just use object scope.)
-
Yeah, pretty much. It avoids the need for constructors altogether, if all you want is just to create some properties. It also avoids the need for super() calls when subclassing.
End of conversation
New conversation -
-
-
What’s the need for private fields? Why not just prefix private fields with an ‘_’ by convention and allow the developer to decide if they want to access a restricted variable? Is there a way to override this and access the variable anyways?
-
The _ convention already exists. If that’s good enough for you, feel free to stick to it! Private fields are useful if you want to prevent the field from being accessed outside of the class body itself.
- 9 more replies
New conversation -
-
-
Why didn't you just use Math.Pi() ? Just a question but cool code


-
Math.PI is not fake enough.
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
Public class fields are shipping in
Private class fields are coming soon.