How does .NET 4.0's design by contract compare to Eiffel?
Asked Answered
H

2

11

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?

Hsu answered 16/6, 2009 at 18:6 Comment(0)
P
3

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.

Profusion answered 16/6, 2009 at 18:10 Comment(0)
I
1

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.

Inception answered 16/6, 2009 at 18:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.