haskell - Comparing design by contract to type systems -
i read paper compared design-by-contract test-driven-development. there seems lot of overlap, redundancy, , little bit of synergy between dbc , tdd. example, there systems automatically generating tests based on contracts.
in way dbc overlap modern type system (such in haskell, or 1 of dependently typed languages) , there points using both better either?
the paper "typed contracts functional programming" ralf hinze, johan jeuring, , andres löh had handy table illustrates whereabouts contracts sit in design spectrum of "checking":
| static checking | dynamic checking ------------------------------------------------------------------- simple properties | static type checking | dynamic type checking complex properties | theorem proving | contract checking
see here:
Comments
Post a Comment