$5 + 10 CHF = $10 if rate is 2:1$5 * 2 = $10Make “amount” privateDollar side effects?Money rounding?equals()hashCode()Equal nullEqual object5 CHF * 2 = 10 CHFDollar/Franc duplicationCommon equalsCommon times
There is a fabulous sequence in Crossing to Safety in which author Wallace Stegner describes a character's workshop. Every item is perfectly in place, the floor is spotless, all is order and cleanliness. The character, however, has never made anything. “Preparing has been his life's work. He prepares, then he cleans up.” (This is also the book whose ending sent me audibly blubbering in business class on a trans-Atlantic 747. Read with caution.)
We avoided this trap in Chapter 5. We actually got ...