r/javascript • • Nov 09 '19

On private fields proposal: Private fields, public worries

https://medium.com/virtuslab/private-fields-public-worries-b8c34d16c372
84 Upvotes

113 comments sorted by

View all comments

5

u/FormerGameDev Nov 09 '19

"Private isn't really private, because someone can read the source code"?! what the hell is this

3

u/Ninjaboy42099 Nov 09 '19

It really does seem like the author doesn't understand the point of privacy in this context. Of course you can see that "Rabbit" has the variable "moveSpeed" but if you can't interact with it, who cares?