3 ms·
>- The "Structural*" types are new in .Net 4.0, you never had to understand them before and you probably don't need to even know they exist now. You're right,
by iskander 16y ago
>- The "Structural*" types are new in .Net 4.0, you never had to understand them before and you probably don't need to even know they exist now.
You're right, I scooped those off MSDN and never use them myself. All the others, however, have made numerous appearances in my code. I think that the preponderance of comparisons is a language smell-- it's not close to my only problem with .NET development but I think it captures the essential headache-inducing inelegance of C#/VB programming. That language-blob has little regularity but much accretion. There are rarely sane defaults nor any overarching design for your mind to latch onto. After time spent with saner languages (Python, Haskell, Ruby, OCaml, etc...) coding in .NET feels terrible.
- snprbob86 16y agoJava also has Comparer and Comparator in both generic and non-generic flavors. Java lacks Equatable, which is a problem. Haskell, for example, has both Eq and Ord. It is frequently possible and convenient to be able to implement Eq in terms of Ord and part of Ord in terms of Eq, but these are orthogonal concepts. As someone who has done A LOT of professional C# development: I've found that with only a few exceptions, the .NET base class libraries are very well designed with entirely reasonable defaults. I use Python primarily now and, in general, the core .NET libraries seem to be better designed than most of the older Python libraries (many of which are getting properly cleaned up in Python 3). Every environment has its cruft.