This article presents the design of a simple password validator that can be configured at compile time by composing independent validation policies. Compile-Time Policy Composition for Password Validation by Daniel Gómez Vergel From the article: A traditional object-oriented solution could rely on dynamic polymorphism and the Decorator pattern to select and combine validation policies at runtime. In this article, we take a different approach: policy composition is performed entirely at compile time, making the validator configuration part of the type itself.