Talk:Friend class

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Example[edit]

Please show example here. — Preceding unsigned comment added by 192.203.57.28 (talk) 07:52, 3 June 2011 (UTC)

Rationale[edit]

I take issue with the rationale example because friendship breaks encapsulation (and worse encapsulation typically lends itself to tighter coupling). I think a better example and a more thorough analysis in the rationale would help. — Preceding unsigned comment added by 70.62.20.222 (talk) 16:14, 24 August 2015 (UTC)

Friendship doesn't break encapsulation. As mentioned, it can actually increase encapsulation where members would otherwise have to be public. And the article already mentions that friendship leads to tighter coupling (though perhaps not in the way you are thinking). Please give an example of what you are thinking of so that the article may be improved. Hpesoj00 (talk) 18:12, 3 August 2016 (UTC)