code |
This is one of a few issues reporting minor concerns regarding The Scala Language Specification, as supplied with 2.3.3.
Section 1.1 (Identifiers) Discussion of underscore in identifier names
The sentence "This may be
followed by underscore ‘_’ characters and other string composed of either letters
and digits or of special characters" doesn't make it clear that y_ , _MAX_LEN_ , dot_product_* are valid identifiers (because '_' is a letter). Perhaps another identifier could appear in Example 1.1.1 to make it clear. Sorry, I don't have an alternate wording for the sentence.
Section 1.1 (Identifiers) Suspicious identifier example
+_field is listed as an identifier in Example 1.1.1. Is this correct? It doesn't begin with an upper or lower case letter, and doesn't contain special characters exclusively. The compiler rejects it.
Section 1.3 (cosmetic) missing comma
There are literals for integer numbers floating point numbers
should be
There are literals for integer numbers, floating point numbers
Section 1.3.2 (optional, cosmetic) grammar might be considered ambiguous
| digit {digit} exponentPart [floatType]
| digit {digit} [exponentPart] floatType
could instead be
| digit {digit} exponentPart [floatType]
| digit {digit} floatType
(otherwise digit {digit} exponentPart floatType matches both lines)
|