Use Advanced Search to search the entire archive.
Re: Remove "generic" multiply/divide operations from Quantity
- From: Martin Desruisseaux <
>
- To:
- Subject: Re: Remove "generic" multiply/divide operations from Quantity
- Date: Sat, 18 Oct 2014 19:00:00 +0900
- Organization: Geomatys
Hello Leanardo
Le 17/10/14 20:49, Leonardo Lima a écrit :
>
It seems that the best way out is to leave the operations that change
>
unit (inverse, multiply, divide) out of scope and wait until there's
>
better support for this in the Java APIs. This because once we add a
>
method, we (almost) can't remove it from the API; but we can always
>
add new ones.
Indeed UNITSOFMEASUREMENT-62 could be done properly if a future Java
version supports some kind arithmetic operations on parameterized types
like what C/C++ allows with templates (see Scientific and Engineering
C++, published in 1994, for a proof of concept). In the main time, we can:
* Leave that out (use raw type, i.e. Quantity)
* Or returns Quantity<?>.
This choice may depends on how long it may take before Java supports
such operation, if it does. But this would be the subject of an other
thread. For now I need to get those who don't see it yet why
UNITSOFMEASUREMENT-62 is wrong.
Martin