Talk:Friend class

From Wikipedia, the free encyclopedia
Jump to: navigation, search
          This article is of interest to the following WikiProjects:
WikiProject Computer science (Rated Start-class, Low-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the project's quality scale.
 Low  This article has been rated as Low-importance on the project's importance scale.
 
WikiProject C/C++ (Rated Start-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject C/C++, a collaborative effort to improve the coverage of C/C++ on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Start-Class article Start  This article has been rated as Start-Class on the quality scale.
 Mid  This article has been rated as Mid-importance on the importance scale.
This article falls within the scope of C++.
 

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)