Code contracts are one of the concepts in programming that really resonates with me. The ability to verify that a contract between a method or class and its caller or consumer is met strikes me as an incredibly powerful model.
It looks like .NET 4.0 is going to have code contracts that can be injected into your code (seems like it modifies your binaries kind of the way aspect oriented programming does in java) to enforce contracts at runtime and also compiles against them statically.
Are there any good code contract libraries/extensions for native C++? In the Win32 world i suppose that using SAL and PreFast is about as good as it gets right now.