Unencapsulated means Unchangeable?

I came across this line in Effective C ++:

Public funds are unencapsulated, and practically speaking, unencapsulated funds are unchangeable, especially for widely used classes. For widely used classes, the most in need of encapsulation, because these are the ones that can benefit most from the ability to replace one implementation, better one

What does the author mean “Public funds, unencapsulated and practically speaking, unencapsulated means unchangeable”?

And how unencapsulated unchangeable?

+4
source share
4 answers

. - , - , , . , - , , , . ; , , , - .

- . , , .

, . , ( ), .

++; . , , .

+7

- , . "" , , ( , ).

, , , , , .

, , . , , ( , ).

, ( ). , . " ".

"" , , :

std::string getStringWithKey(int index);

, - . : , ( ), , , , .

, , , , .

+3

, . , , , , .

+2
source

He refers to data members, and he says that publicly publicizing data elements as part of an open interface means that you can never change their nature, that is, name and type.

0
source

All Articles