News for hackers. Stuff that matters.
Re:Implementing Private Fields for JavaScript by andy_ppp on Sunday June 13, 2021 @06:21AM (#27491350)
Variables are never truly private in the compiled JS though. You can fake it using clever closure techniques but there are still ways to access the vars as I understand it. This is fixing that at the JS level.
Re:Implementing Private Fields for JavaScript by tylerhou on Sunday June 13, 2021 @06:57AM (#27491534)
I don’t know of any way of accessing lexically bound variables that are captured by a closure if there is no explicit getter.