Hacker News new | past | comments | ask | show | jobs | submit login

The basic proposition of OO is that objects encapsulate their private state.

I'd say the most basic proposition is that you solve problems by representing the nouns in the problem domain as objects in software. You could have a version of OOP that doesn't involve hiding internal state.




> You could have a version of OOP that doesn't involve hiding internal state.

I think that would make writing sentences with those nouns somewhat difficult.


Right. The basic tenets of OO are (1) identity and (2) encapsulation. Many would also throw in messaging.


> You could have a version of OOP that doesn't involve hiding internal state.

That is in fact the default form of OOP in javascript.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: