Closed thegedge closed 7 years ago
Allow clients to decide what type of values a Measurable has. This allows clients to not incur the cost of a BigDecimal if they don't need it. When a non-integral calculation has to be made, we can coerce things to BigDecimal.
Measurable
BigDecimal
Related: https://github.com/Shopify/measured/issues/35
I've decided against doing this for now. Most operations here will likely involve non-integral numbers, so it's best to stay safe.
Allow clients to decide what type of values a
Measurable
has. This allows clients to not incur the cost of aBigDecimal
if they don't need it. When a non-integral calculation has to be made, we can coerce things toBigDecimal
.