To celebrate the announcement of .NET Framework 4.0, here are four links to stuff I found interesting enough to share with you guys:
- .NET 4.0’s game-changing feature? Maybe contracts…
- What’s New in the BCL in .NET 4.0
- Code Contracts – Make Coding Assumptions Explicit and Tool Discoverable in .NET
- Microsoft Solver Foundation – Customer Technology Preview
The main point being that it looks like we’re going to gain Design by Contract (pre-conditions, pos-conditions, etc.) features in the next version of the framework.
Although there are people not very happy about it being a feature of the framework library instead of the language, I’d like to remember that it is totally possible that in the future, the language incorporates syntax sugar that beneath uses the library’s features.
LINQ, “using”, “lock” all use .NET Framework class library methods under the covers, so there’s still hope! If today we have “int?” as a shorthand for Nullable<int>, how cool would it be to have something like “Customer!” for a non-nullable Customer parameter, field or variable!
Most of this design by contract stuff is based on ideas from Spec# – a research language developed by Microsoft Research.