3 Jan
2016
3 Jan
'16
4:20 a.m.
On Fri, Jan 1, 2016 at 9:25 AM, Itzik
So I was hoping to get the reasoning behind the exclusion of the operators '+' and '/' for absolute quantities. In my eyes there's not much difference between summing two absolute quantities of mass density and two absolute temperatures.
He gave the explanation. Adding two absolute quantities does not, itself, have meaning, or at least not as an absolute quantity. If you allow that operation directly, you're just introducing a way for users to make a mistake that otherwise would have been correctly caught at compile time. These are some of the kinds of errors that such a unit library aims to prevent, so allowing the operation would go against the idea of the library. -- -Matt Calabrese