A question on JEP 455 specification

Ella Ananeva ella.ananeva at oracle.com
Wed Oct 18 02:04:47 UTC 2023


Hi team,
Reading the spec for JEP 455, I was puzzled with the following part:

The following conversions are unconditionally exact:

  *   …
  *   a widening primitive conversion which is:
     *   from any integral type to any integral type and neither of them is char
     *   ….
  *   …
At first (at the first 5 times, I confess) I read it as “an unconditionally exact conversion is, among others, a widening primitive conversion, e.g. a conversion from any integral type to any integral type, but not char.”
I understand now that what was likely meant is that an unconditionally exact conversion includes, among others, a widening primitive conversion of integral types (but not char), and that the reader has to refer to the definition of widening primitive conversion to understand the conversion of which type will be unconditionally exact and which ones are not.
The difference here is that at first I thought the author re-defined a widening primitive conversion as a conversion from any integral type to any integral type. “a widening primitive conversion which is” is the wording that caused my confusion.
I’d like to confirm that my understanding is correct. Also, may it be a source of potential confusion for future readers of the spec?
Thank you,
Ella Ananeva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20231018/7c917432/attachment-0001.htm>


More information about the amber-dev mailing list