T
Taras_96
HI all,
Jesse Liberty at http://newdata.box.sk/bx/c/htm/ch15.htm#Heading24
writes
"NOTE: You will often hear novice C++ programmers complain that friend
declarations "undermine" the encapsulation so important to object-
oriented programming. This is, frankly, errant nonsense. The friend
declaration makes the declared friend part of the class interface, and
is no more an undermining of encapsulation than is public derivation."
But public derivation doesn't expose the *private* data, so doesn't it
still to some extent undermine encapsulation?
Jesse Liberty at http://newdata.box.sk/bx/c/htm/ch15.htm#Heading24
writes
"NOTE: You will often hear novice C++ programmers complain that friend
declarations "undermine" the encapsulation so important to object-
oriented programming. This is, frankly, errant nonsense. The friend
declaration makes the declared friend part of the class interface, and
is no more an undermining of encapsulation than is public derivation."
But public derivation doesn't expose the *private* data, so doesn't it
still to some extent undermine encapsulation?