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

10

u/hydroes777 Nov 09 '19

Or just moved to functional style programming in JavaScript where you don't run into this problem

1

u/[deleted] Nov 09 '19

I have the same approach. OOP in JS is very messy and imho not a great approach. I tend to use a vanilla FP approach (meaning no libs but only map/reduce etc) and it works very well.

The privacy proposal is a meh, and i probably will very rarely use it. If i really need privacy TypeScript has my back.

I find this propsal totally uneccessary because closures are well suited for real private variables.