By rdingwall
via richarddingwall.name
Published: Apr 10 2010 / 08:32
In defensive programming, guard clauses are used to protect your methods from invalid parameters. In design by contract, guard clauses are known as preconditions, and in domain driven design, we use them to protect invariants — unbreakable rules that form assumptions about our model.
Add your comment