TY - GEN
T1 - The love/hate relationship with the C preprocessor
T2 - 29th European Conference on Object-Oriented Programming, ECOOP 2015
AU - Medeiros, Flávio
AU - Kästner, Christian
AU - Ribeiro, Márcio
AU - Nadi, Sarah
AU - Gheyi, Rohit
N1 - Publisher Copyright:
© Flávio Medeiros, Christian Kästner, Márcio Ribeiro, Sarah Nadi, and Rohit Gheyi;.
PY - 2015/7/1
Y1 - 2015/7/1
N2 - The C preprocessor has received strong criticism in academia, among others regarding separation of concerns, error proneness, and code obfuscation, but is widely used in practice. Many (mostly academic) alternatives to the preprocessor exist, but have not been adopted in practice. Since developers continue to use the preprocessor despite all criticism and research, we ask how practitioners perceive the C preprocessor. We performed interviews with 40 developers, used grounded theory to analyze the data, and cross-validated the results with data from a survey among 202 developers, repository mining, and results from previous studies. In particular, we investigated four research questions related to why the preprocessor is still widely used in practice, common problems, alternatives, and the impact of undisciplined annotations. Our study shows that developers are aware of the criticism the C preprocessor receives, but use it nonetheless, mainly for portability and variability. Many developers indicate that they regularly face preprocessorrelated problems and preprocessor-related bugs. The majority of our interviewees do not see any current C-native technologies that can entirely replace the C preprocessor. However, developers tend to mitigate problems with guidelines, even though those guidelines are not enforced consistently. We report the key insights gained from our study and discuss implications for practitioners and researchers on how to better use the C preprocessor to minimize its negative impact.
AB - The C preprocessor has received strong criticism in academia, among others regarding separation of concerns, error proneness, and code obfuscation, but is widely used in practice. Many (mostly academic) alternatives to the preprocessor exist, but have not been adopted in practice. Since developers continue to use the preprocessor despite all criticism and research, we ask how practitioners perceive the C preprocessor. We performed interviews with 40 developers, used grounded theory to analyze the data, and cross-validated the results with data from a survey among 202 developers, repository mining, and results from previous studies. In particular, we investigated four research questions related to why the preprocessor is still widely used in practice, common problems, alternatives, and the impact of undisciplined annotations. Our study shows that developers are aware of the criticism the C preprocessor receives, but use it nonetheless, mainly for portability and variability. Many developers indicate that they regularly face preprocessorrelated problems and preprocessor-related bugs. The majority of our interviewees do not see any current C-native technologies that can entirely replace the C preprocessor. However, developers tend to mitigate problems with guidelines, even though those guidelines are not enforced consistently. We report the key insights gained from our study and discuss implications for practitioners and researchers on how to better use the C preprocessor to minimize its negative impact.
KW - C preprocessor
KW - CPP
KW - Grounded theory
KW - Interviews
KW - Surveys
UR - http://www.scopus.com/inward/record.url?scp=84958684954&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84958684954&partnerID=8YFLogxK
U2 - 10.4230/LIPIcs.ECOOP.2015.495
DO - 10.4230/LIPIcs.ECOOP.2015.495
M3 - Conference contribution
AN - SCOPUS:84958684954
T3 - Leibniz International Proceedings in Informatics, LIPIcs
SP - 495
EP - 518
BT - 29th European Conference on Object-Oriented Programming, ECOOP 2015
A2 - Boyland, John Tang
PB - Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
Y2 - 5 July 2015 through 10 July 2015
ER -