3 ms·
There's not really a better way while maintaining encapsulation.
by pitaj 9y ago
There's not really a better way while maintaining encapsulation.
- just_astounded 9y agoDon't we already have solutions (closures/WeakMap) for hard encapsulation? Seems like '#' just pollutes the language and isn't really needed.
- pitaj 9y agoThere are solutions, but people want a syntax solution for it. Personally, I think that private instance properties should be a separate proposal from static and instance properties. That way, people could decide if they want some of it, or all of it.