IComaprer & IComparable Refactoring Proposal

We are exploring the possiblility of changing the design of IComparer<T> and IComparable<T> interfaces that will ship with Whidbey. This post describes some more detail on the issues we are trying to address with the design change and we are looking for feedback on the proposal. Background The first version of the .NET Framework had…

23

API Design Myth: Interface as Contract

I often hear people saying that interfaces specify contracts. I believe this is a dangerous myth. Interfaces, by themselves, do not specify much beyond the syntax required to use an object. The interface-as-contract myth causes people to do the wrong thing when trying to separate contracts from implementation, which is a good engineering practice. Interfaces…

10

Design Guidelines Update: Factories vs. Constructors

Joe has recently spent some time beefing up the Factory vs. Constructor guidelines. This subject has been the center of lots of intenral debates. Finally, we agreed on the fllowing: Factories The most common and consistent way to create an instance of a type is via its constructor. However, sometimes a preferable alternative is to use…

14