News for hackers. Stuff that matters.
Re:C#'s Greatest Mistakes by Jon Skeet by skybrian on Friday November 26, 2010 @09:46PM (#1944107)
It's a mistake in Java too. It's often convenient to simply skip implementing equals() and hashCode() because you don't plan to use an object as the key to a map. In that case, attempting to use it as a key should fail to compile, so you know you need to go back and add it.

The Comparable interface shows how it should be done.

(But on the other hand, if you were starting over it would be better to learn from Go's interfaces.)

Re:C#'s Greatest Mistakes by Jon Skeet by jpr on Saturday November 27, 2010 @04:18AM (#1944663)
Uh oh, I wouldn't want anyone to copy anything that has to with typesystem from Go before they tell how they are going to have typesafe containers without generics. Haskell typeclasses would be a better source of inspiration IMNSHO.