Knocking off two more vestiges of legacy switch

forax at univ-mlv.fr forax at univ-mlv.fr
Tue Sep 13 16:59:40 UTC 2022


----- Original Message -----
> From: "Brian Goetz" <brian.goetz at oracle.com>
> To: "joe darcy" <joe.darcy at oracle.com>, "Amber Expert Group Observers" <amber-spec-observers at openjdk.org>, "Remi Forax"
> <forax at univ-mlv.fr>
> Cc: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
> Sent: Tuesday, September 13, 2022 6:55:49 PM
> Subject: Re: Knocking off two more vestiges of legacy switch

>> It is common for math library methods to have a preamble to screen out
>> special values (infinities, NaN, 0.0, 1.0, etc.).
>>
>> This would be a reasonable use of a switch on float/double switch.
>>
>>
> 
> Which raises some questions (again) of the semantics of constant
> patterns for exotic floating point values, especially (again) negative zero.

You mean, do we use == or Float.equals()/Double.equals() ?

I will vote for the later, like with records.

Rémi


More information about the amber-spec-observers mailing list