Being Cellfish

Stuff I wished I've found in some blog (and sometimes did)

Design by contract in real life

Change of Address
This blog has moved to blog.cellfish.se.

Design by contract in real life

  • Comments 1
Today I got a sweet reminder on developing with contracts when I read this (in Swedish). I always get a warm feeling in my body when I think about design by contract (which I have earlier mentioned here). A summary of the Swedish post is that Microsoft Research is working on one language called Spec# and one extension for any language called CodeContract. I first learned about design by contract in University when we used Eiffel and I like the basic idea. Design by contract is also a very powerful tool to make code reviews effective since it isolates each method making it possible to review a single method without having to look at how the method is used. I once did this in a C project using precondition and postcondition macros that basically where asserts enabled in both release and debug builds. So even without fancy tools and support in the language you can still enjoy the benefits from contract programming.
  • Thanks for this info. I've been a great fan of DbC for many years. I'm glad to see it promoted by MS, both mentally and practically.

Page 1 of 1 (1 items)