3 ms·
Don't use int for money. Use BigDecimal. I know performance is an issue, but you can always find non-hackish solutions: like a memory upgrade from management,
by mahmud 16y ago
Don't use int for money. Use BigDecimal.
I know performance is an issue, but you can always find non-hackish solutions: like a memory upgrade from management, because you're writing safe, clean code :-)
- fauigerzigerk 16y agoBigDecimal uses 10 times as much memory as an int but I didn't intend to properly model currency amounts anyway.
- mahmud 16y ago:-) http://img.thedailywtf.com/images/200902/errord/DSC00669.JPG http://img.thedailywtf.com/images/200902/errord/DSC00669.JPG