Design by contract is a sound practice which enforced many rules of thumb for software development e.g. coded design goals, clarified responsibilities, helped with regressions etc. Post and pre condition implementation are is great way to convey the contract definition. There are several things to worry though. As they can be:
- badly coded e.g. utilizing code mutating the object
- considered as too much of overhead
MS Labs guys have come up with Spec#, which is meant to help with exactly these aspects and guide us developers informing about the contract violations as early as possible - check this out, very interesting...
I am very much in favour of dynamic languages. I like the pure transformation definitions in functional programming world, lazy evaluation, allowing generic code reuse at the level of a function, with no or limited side effects giving you the edge when talking about scalability and performance. From programming basics we know that whatever you program, there is always a cost you incur, which is either related to memory or processing power utilisation. Hence many disputes raised like the one on InfoQ about continuous tax etc.
Regardless of this more and more functional languages and their aspects enter the popular development scene:
- Google very much in favour of Python
- In my previous life we had CAL
No comments:
Post a Comment