A rule I learned from writing Java is that if you implement
equality, you must also implement hashing, and if you implelement
hashing you must implement equality. I believe this is actually a
general truth of programming in any language, and now D has the
right kind of semantics.
On an off topic note, I noticed your signature, H.S. Teoh.
"640K ought to be enough" -- Bill G., 1984.
That quote is well known for being fabricated. The year varies
wildly. There's no evidence of Bill ever saying it which isn't
someone saying, "Trust me, I heard him say it once."