Hacker News new | ask | show | jobs
by rramadass 585 days ago
Interesting. I am a fan of DbC (following Meyer's Applying "Design by Contract" - pdf at https://se.inf.ethz.ch/~meyer/publications/computer/contract...) though due to runtime costs (as you point out) i limit it to pre-conditions only everywhere (almost all "policy" part of the code and less on the "mechanism" side) and tighter pre/post-conditions on module boundaries only.

> programmers won't write them, or will write them incorrectly.

I think this is a matter of education and discipline and not an argument for not using DbC.

If it is okay with you could you share your dissertation and maybe highlight the key points which led you to your conclusion of "They are generally useless"? I think it would be useful to know.