|
From: Luigi B. <lui...@gm...> - 2011-09-06 11:02:01
|
On Mon, 2011-09-05 at 09:31 -0600, Matt Fair wrote: > Luigi, > I understand that you can call close_enough manually if you need to, > but from an object oriented standpoint it doesn't make sense. Is > there a reason why you have both? It was to have the same behavior as doubles, but I see your point. That's an implementation detail, not the behavior expected in the domain (actually, Money shouldn't use a floating-point number at all---we should store an integer number of cents---but that's for another time.) I wonder if one should go all the way and compare after rounding? Thoughts? Luigi -- Better to have an approximate answer to the right question than a precise answer to the wrong question. -- John Tukey as quoted by John Chambers |