Slashdot Mirror


Why Is "Design by Contract" Not More Popular?

Coryoth writes "Design by Contract, writing pre- and post-conditions on functions, seemed like straightforward common sense to me. Such conditions, in the form of executable code, not only provide more exacting API documentation, but also provide a test harness. Having easy to write unit tests, that are automatically integrated into the inheritance hierarchy in OO languages, 'just made sense'. However, despite being available (to varying degrees of completeness) for many languages other than Eiffel, including Java, C++, Perl, Python, Ruby, Ada, and even Haskell and Ocaml, the concept has never gained significant traction, particularly in comparison to unit testing frameworks (which DbC complements nicely), and hype like 'Extreme Programming'. So why did Design by Contract fail to take off?"

1 of 178 comments (clear)

  1. Re:DbC? Unit testing? Boring and costs time. by DaveV1.0 · · Score: 0, Flamebait

    To top it off, most projects don't require that kind of quality at all.


    That statement is why most software and almost all FLOSS suck ass.

    It is also why most engineers sneer at the idea of a software engineer.
    --
    There is no "-1 offended" or "-1 you don't agree with me" mod options for a reason.