$(DDOC $(DDOC_BLANKLINE ) $(DDOC_BLANKLINE ) $(SPEC_S Contract Programming, $(DDOC_BLANKLINE ) $(HEADERNAV_TOC $(HEADERNAV_ITEM assert_contracts, Assert Contract) $(HEADERNAV_ITEM pre_post_contracts, Pre and Post Contracts) $(HEADERNAV_ITEM Invariants, Invariants) $(HEADERNAV_ITEM references, References) ) $(DDOC_BLANKLINE ) $(P Contracts enable specifying conditions that must hold true when the flow of runtime execution reaches the contract. If a contract is not true, then the program is assumed to have entered an undefined state.) $(DDOC_BLANKLINE ) $(RATIONALE $(P Building contract support into the language provides:) $(DDOC_BLANKLINE ) $(OL $(LI a consistent look and feel for the contracts) $(LI tool support) $(LI the implementation can generate better code using information gathered from the contracts) $(LI easier management and enforcement of contracts) $(LI handling of contract inheritance) ) ) $(DDOC_BLANKLINE ) $(HTMLTAG3V img, src="$(ROOT_DIR )images/d4.gif" style="max-width:100%" alt="Contracts make D bug resistant" border="0") $(DDOC_BLANKLINE )