3 ms·
No, please don't. Often you have to combine money with quantities that also need unit of measure conversions and this just is one step too far. Frankly, chasi
by protomyth 7y ago
No, please don't. Often you have to combine money with quantities that also need unit of measure conversions and this just is one step too far. Frankly, chasing the error goes from a programming problem to a contract problem very quickly.
Also, you are going to end up storing in decimal fields in the database anyway.
- dionian 7y ago> Also, you are going to end up storing in decimal fields in the database anyway. why not use cents as the unit and store it without decimals?
- protomyth 7y agoBecause it is a massive pain in the butt for your report writers / business intelligence people whose tools expect decimal fields. Never mind all the existing code that expects an actual decimal and not an integer. Plus tax folks like like their mills.
- Supermancho 7y ago> Because it is a massive pain in the butt for your report writers / business intelligence people whose tools expect decimal fields That's a matter for the ETL that dumps the data on their screens.
- protomyth 7y agoYeah, no. First, sometimes you actually don't get to use a ETL before doing the report, and massaging an integer or float to decimal in an ETL is just going to cause you trouble.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]