A question on JEP 455 specification
Brian Goetz
brian.goetz at oracle.com
Wed Oct 18 14:00:43 UTC 2023
Your interpretation is correct: the conversions are defined elsewhere,
and this paragraph defines no new conversions, it just says "these are
the ones that are unconditionally exact" (certain primitive widenings,
boxing, etc.)
On 10/17/2023 10:04 PM, Ella Ananeva wrote:
>
> 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: /
> o /from any integral type to any integral type and neither of
> them is //char///
> o /…./
> * /…/
>
> 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/f8490f1d/attachment-0001.htm>
More information about the amber-dev
mailing list