Aladdin - Scala Bugtracking
[#915] project: documentation priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2007-01-28 22:55:47.0
subject [contrib #311] Identifiers and Literals
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)
what happened
what expected
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-01-28 23:01:55.0
contribution #311
Martin  edited on  2007-01-29 17:13:08.0