Generic feature modules: Two-staged program customization

With feature-oriented programming (FOP) and generics programmers have proper means for structuring software so that its elements can be reused and extended. This paper addre sses the issue whether both approaches are equivalent. While FOP targets at large-scale building blocks and comp ositional programming, generics provide fine-grained customization at type-level. We contribute an analys is that reveals the individual capabilities of both approaches with respect to program customization. Ther efrom, we extract guidelines for programmers in what situations which approach suffices. Furthermor , we present a fully implemented language proposal that integrates FOP and generics in order to combine the ir strengths. Our approach facilitates two-staged program customization: (1) selecting sets of features; (2) p arameterizing features subsequently. This allows a broader spectrum of code reuse to be covered – reflected by proper language level mechanisms. We underpin our proposal by means of a case study.