Tech Off Post

Single Post Permalink

View Thread: Ideas for C# 5.0
  • User profile image

    exoteric said:
    vesuvius said:

    I'm quite curious as to how you'd create a more efficient representation than a struct wrapping a reference type, please elaborate.


    Actually this is not about performance at all, it is about correctness.


    I'm not very familiar with Spec# but believe it has syntax support for non-nullability. Does Spec# not use the off-the-shelf CLR?


    As to extension methods, that's a different thread, this is about C# 5.0 ideas (but would welcome any discussion about anti-patterns there; I don't think Contract makes sense as an extension method cluster at all; it does make sense, however, to lift the methods out to be accessible without name qualification; MessageBox.Show, I don't know about that one; - but let's have that discussion in the other thread).

    I like your idea. I'd extend it to say I think .NET should have used non-nullable types by default. But it's probably too late for that. Sad