views:

359

answers:

3

I had the "pleasure" to be taught Eiffel at college by none other than Bertrand Meyer himself and just read that .NET 4.0 will include design by contract.

Can anyone with some insight elaborate on how powerful this will be compared to Eiffel's existing feature set?

Will contracts for interfaces be supported?

+2  A: 

Not having ever used Eiffel I can't comment on the comparison, but I have messed around with Spec#, which has design by contract and is what is (mostly) being rolled into C# 4.0, and I can say this:

It's pretty darn powerful.

Randolpho
+1  A: 

It allows you to specify "design-time asserts" and the compiler will warn you that you might violate the constraint.

Here's a blog post that explains it a little, with a link to a Channel9 detailed explanation.

gbjbaanb
A: 

LOL,I need to know what you meant by "pleasure" ;)

Schalk Dormehl