Skip to main content

Re: Remove "generic" multiply/divide operations from Quantity

  • From: Martin Desruisseaux < >
  • To:
  • Subject: Re: Remove "generic" multiply/divide operations from Quantity
  • Date: Sun, 19 Oct 2014 23:21:54 +0900
  • Organization: Geomatys

Le 19/10/14 04:20, Otávio Gonçalves de Santana a écrit :
> Martin, maybe I expressed me bad.
> Java has the Generic resources in Java 1.5, but it should to keep the
> compatibility to older version of Java.
> When I told "new API", I means API after the generics, in other words,
> Java 1.6 or above.
> If you look to the Since annotations of this example you will see
>  almost always 1.4 and Just one 1.5 , in other words, no one is new API.

I do not think that it matter much. The JDK team had the freedom to add
whatever parameterized type they wanted in the API - this was the
purpose of "type erasure". They were not forced to use <?> for
preserving compatibility. Indeed, they used massively more complex types
in large part of the API: collections (which is a Java 1.2 API),
reflection, swing, etc. Consequently I think that their use of
Comparable<?> was a design choice, not a compatibility constraint.

<?> is not necessarily "old school", "legacy" or "bad design". In some
situations it is really the most appropriate signature.

    Martin



Re: Remove "generic" multiply/divide operations from Quantity

(continued)

Re: Remove "generic" multiply/divide operations from Quantity

Leonardo Lima 10/17/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Otávio Gonçalves de Santana 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Leonardo Lima 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Otávio Gonçalves de Santana 10/18/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Jean-Marie Dautelle 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Martin Desruisseaux 10/19/2014

Re: Remove "generic" multiply/divide operations from Quantity

Werner Keil 10/19/2014
 
 
Close
loading
Please Confirm
Close