2 comments

[ 3.6 ms ] story [ 18.3 ms ] thread
Design by contract is great, but if you want to go beyond the basics, you really need some form of language support. In the absence of inheritance, precondition and postcondition handling aren't too tough to deal with via preprocessors. But inheritance is much harder to handle, as are class and loop invariants, yet these are the very places where DBC really starts to shine.
I totally agree, but even just the basics can be a great addition. What I find odd is even just simple things such as pre or post conditions don't appear to be used widely, let alone cool features built into languages such as Eiffel or D.