+ 3
Where is encapsulation useful?
Is it the same in JavaScript and other languages?
2 Respuestas
+ 4
I think it's just as useful in any language with OOP paradigm. The point of encapsulation is to rather hide the complexity in classes and allow the outsiders to make use of the class without having concerns about what complexity lies behind the simplicity being offered.
Not really sure that's what you meant to ask though ...
+ 2
Yes,
I believe setters and getters and also proxies are encapsulation implementions.