Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Why would you design a system that intentionally destroys data several times internally?

Because it matches the requirements of the domain being modeled.

Most business to business and business to consumer transactions require that amounts are limited to some number of decimal positions (e.g. in US it's 2 decimal positions).

If you create a system document/transaction like an invoice that doesn't adhere to this rule then your software is not properly modeling the domain (i.e. it's a design flaw).

If you decided to leave it unrounded internally, then you are basically storing an incorrect value and delaying the calculation of the correct value until consumption (which is typically hundreds to thousands of consumers).

But what is the gain to storing the wrong value? Nobody wants it and it just complicates the entire system.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: