A replicated and refined empirical study of the use of friends in C++ software

Research output: Contribution to journalArticlepeer-review

Abstract

The friend mechanism is widely used in C++ software even though the potential benefits of its use are disputed and little is known about when, where and why it is employed in practice. Furthermore, there is limited empirical analysis of its impact in object-oriented software, with only one study (Counsell and Newson, 2000) reported at journal level. This paper aims to add to the empirical evidence of friendship's impact by replicating Counsell and Newson (2000)'s original study. The study's design is refined to improve the construct validity of the evaluation and a larger cohort of systems is used to improve the generalisability of the results. The findings suggest that classes involved in friendship are coupling hotspots and that there is no link between inheritance and friendship, contrary to the findings presented in Counsell and Newson (2000). The findings also suggest that the use of friends in a class is independent of the number of hidden members in a class.

Original languageEnglish
Pages (from-to)2275-2286
Number of pages12
JournalJournal of Systems and Software
Volume83
Issue number11
DOIs
Publication statusPublished - Nov 2010

Keywords

  • C++
  • Empirical study
  • Friend
  • Object-oriented
  • Open-source

Fingerprint

Dive into the research topics of 'A replicated and refined empirical study of the use of friends in C++ software'. Together they form a unique fingerprint.

Cite this