Declare members private for :
Cheers and try hosting at Linode.
- Syntactic Consistency: Every call-able member would be a function.
- Granular Accessibility: Using "setter" and "get" functions
- Encapsulation:
- Implement functions the way it suits best. For example: On embedded devices: it must use less memory whereas on other machines, it may be allowed to take more memory to speed it up more.
- Private data members put more restriction on their interaction with the users as compared to protected and public data members. So removing private data member (to change some implementation) leads to less broken code relatively.
Cheers and try hosting at Linode.
No comments:
Post a Comment