Wrong phrase in "3.10.2". Small "Java Language Specification" improvement.

Dmitri Cerkas dmitricerkas at yahoo.com
Wed Jun 15 13:48:22 UTC 2022


 Hello JLS Team,
at the begining of the "3.10.2" paragraph of Java Language Specification (starting from the version 6 and up) you can read:"A floating-point literal has the following parts: a whole-number part, a decimal or hexadecimal point (represented by an ASCII period character), a fraction part, an exponent, and a type suffix"
So this implies that decimal floating-point literal has the following parts:1) a whole-number part,2) a decimal point,3) a fraction part,4) an exponent,5) and a type suffix.
and below in the same "3.10.2" paragraph you can read:"For decimal floating-point literals, at least one digit (in either the whole number orthe fraction part) and either a decimal point, an exponent, or a float type suffix arerequired. All other parts are optional. The exponent, if present, is indicated by theASCII letter e or E followed by an optionally signed integer."
So parts that are required for decimal floating-point literals are:a) at least one digit (in either the whole number or the fraction part)     (this corresponds to "1) a whole-number part" and "3) a fraction part" above)
b) and either a decimal point    (this corresponds to "2) a decimal point" above) c) an exponent    (this corresponds to "4) an exponent" above) d) a float type suffix    (this corresponds to "5) and a type suffix" above) 
So the phrase "All other parts are optional." is wrong because all parts are already listed.
I thing that the phrase "All other parts are optional." should be removed and description of what is required for decimal floating-point literals becomes:"For decimal floating-point literals, at least one digit (in either the whole number or the fraction part) and either a decimal point, an exponent, or a float type suffix are required. The exponent, if present, is indicated by the ASCII letter e or E followed by an optionally signed integer."
Thank you,Dmitri.

    On Tuesday, January 11, 2022, 11:56:52 AM GMT+1, Dmitri Cerkas <dmitricerkas at yahoo.com> wrote:  
 
  Hello JLS Team,
if you look at "Table of Contents" of the "Java Language Specification" and, in particular, at the structure of Chapter 4 "Types, Values, and Variables", you can see the following substructure:
"4.2 Primitive Types and Values 54 4.2.1 Integral Types and Values 55 4.2.2 Integer Operations 55 4.2.3 Floating-Point Types and Values 57 4.2.4 Floating-Point Operations 59 4.2.5 The boolean Type and boolean Values 61"
, where: 
 1) "4.2.1 Integral Types and Values" contains info about possible values of 5 integral types,2) "4.2.2 Integer Operations" tells about possible operations on integral values,3) "4.2.3 Floating-Point Types and Values"  contains info about possible values of 2 floating-point types, 
4) "4.2.4 Floating-Point Operations" tells about possible operations on floating-point values.
If you look, however, at the content of "4.2.5 The boolean Type and boolean Values" you can note that this paragraph speak both: 1) about possible values of boolean type and 2) about possible operations on boolean type.
I know this might sound too picky, but logically, the paragraph "4.2.5" should be: "4.2.5 The boolean Type, boolean Values and boolean operations."

Thank you,Dmitri.


    On Tuesday, December 21, 2021, 07:05:19 PM GMT+1, Alex Buckley <alex.buckley at oracle.com> wrote:  
 
  From your mention of pull requests, I presume you're thinking about the 
OpenJDK source code hosted at https://github.com/openjdk/jdk/

You can make pull requests against that repo to improve the Java API 
specs -- "the javadoc" -- which might be what you mean by "Java 
documentation". Here's a recent example of someone doing that:

  https://github.com/openjdk/jdk/pull/6076

To learn more about contributing to OpenJDK, please see:

  https://openjdk.java.net/guide/

You may wish to mail the `discuss` list at OpenJDK to ask for help 
getting started with changes to the API specs:

  https://mail.openjdk.java.net/mailman/listinfo/discuss

The Java Language Specification and the JVM Specification are not part 
of OpenJDK. They are not hosted on Github.com and Oracle does not 
support making pull requests against them. Please use the list mentioned 
in the "Feedback" section to report technical errors in the JLS.

Alex

On 12/21/2021 7:51 AM, Dmitri Cerkas wrote:
> Alex, thank you very much for quick response!
> 
> I see on "https://jcp.org/en/participation/membership 
> <https://jcp.org/en/participation/membership>" page that there is the 
> opportunity to become a member of JCP program (the same I'm member of 
> "Jakarta EE" Community).
> 
> May be this solution is best - I found various imperfections carefully 
> reading "The Java Language Specification" and opening direct Pull 
> Requests as JCP member is more practical I think. In addition (as a 
> member) I could improve Java documentation in general, as I did and do 
> for "Jakarta EE".
> 
> Thank you again!
> 
> Have a nice day,
> Dmitri.
> 
> 
> 
> 
> On Monday, December 20, 2021, 06:10:24 PM GMT+1, Alex Buckley 
> <alex.buckley at oracle.com> wrote:
> 
> 
> Dmitri,
> 
> Please see JLS section 1.6 "Feedback":
> 
> https://docs.oracle.com/javase/specs/jls/se17/html/jls-1.html#jls-1.6 
> <https://docs.oracle.com/javase/specs/jls/se17/html/jls-1.html#jls-1.6>
> 
> Alex
> 
> On 12/20/2021 5:42 AM, Bernard Traversat wrote:
>  > FYI,
>  >
>  > Cheers,
>  >
>  > B.
>  >
>  > On 12/20/21, 2:58 AM, "Dmitri Cerkas" <dmitricerkas at yahoo.com 
> <mailto:dmitricerkas at yahoo.com>
>  > <mailto:dmitricerkas at yahoo.com <mailto:dmitricerkas at yahoo.com>>> wrote:
>  >
>  > Hello Community,
>  >
>  > I have some small suggestions on "Java Language Specification" content
>  > improvements. How can I communicate them to you? Do you have a
>  > repository (GitHub, for example) where I could post an Issue or a Pull
>  > Request?
>  >
>  > Thank you very much!
>  >
>  > Have a nice day,
>  >
>  > Dmitri.
>  >
    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jls-jvms-spec-comments/attachments/20220615/031f4985/attachment.htm>


More information about the jls-jvms-spec-comments mailing list