Virtual Separation of Concerns: Toward Preprocessors 2.0
Christian Kästner · it - Information Technology · 2012
Abstract Conditional compilation with preprocessors like cpp is a simple but effective means to implement variability. By annotating code fragments with #ifdef and #endif directives, different program variants with or without these fragments can be created, which can be used (among others) to implement software product lines. Although, preprocessors are frequently used in practice, they are often criticized for their negative effect on code quality and maintainability. We show how simple tool support — views, visualizations, disciplined annotations, and variability-aware type systems — can address these problems and emulate some benefits of modularized implementations. Instead of separating source code into files, we pursue a “virtual separation of concerns”.