DISQUS

Noah's Mark: C#: -100, Java: +1 (?!)

  • Elmar Langholz · 2 years ago
    Check it, more on what the team has to say about C#:
    http://blogs.msdn.com/mattwar/archive/2005/10/0...
  • Matt · 1 year ago
    Geez, I didn't realize you were so angry and emo about programming languages, of all things. Perhaps I'm misunderstanding, but why can't you just declare "public MyType(IList first, IList second)"? That looks the same as what you did with the funky U-ness. Unless you actually want the type to expose List as a type somewhere instead of just IList, which seems unusual to me. I guess it would make more sense if you showed how you wanted the IList to look.
  • Matt · 1 year ago
    Also, curses on your blog for accepting markup without warning and turning all my IList<T> into IList for me. That should read public MyType(IList<T> first, IList<T> second), and "showed how you wanted the IList<?> to look".
  • noah · 1 year ago
    Because an IList and an IList<T> are fundamentally different types: in other words, IList != IList<object>. Even if they were, it still wouldn't be ideal, because I want the methods to return the thing passed in (as an IList<T>), instead of requiring casts everywhere. Added to that, the methods/properties on IList/IList<T> are different.