University of Limerick
Browse

An empirical study of the use of friends in C++ software

Download (87.46 kB)
conference contribution
posted on 2011-07-22, 12:36 authored by MICHAEL ENGLISHMICHAEL ENGLISH, Jim BuckleyJim Buckley, Tony Cahill
A commonly held belief is that the friend construct in C++ is a violation of encapsulation. However, little empirical analysis of its use has taken place to provide evidence to support this claim. This paper presents a study which assesses the design implications of including friendship in a system. A number of hypotheses are investigated based on previous work in this area by Counsell and Newson, [4]. Our initial findings suggest that classes declared as friends are coupling hotspots, that the more friends a class has the more protected and private members it will contain and that friendship is not used to access inherited protected members.

History

Publication

Proceedings of the 13th international workshop on program comprehension (IWPC’05); pp 329-333

Publisher

IEEE Computer Society

Note

peer-reviewed

Other Funding information

SFI

Rights

©2005 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.

Language

English

Usage metrics

    University of Limerick

    Categories

    No categories selected

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC