On 4/25/20 1:01 PM, Arne Vajhøj wrote:
On 4/25/2020 12:57 PM, Arne Vajhøj wrote:Thanks. I don't have earlier than 8 easily available.
On 4/24/2020 11:36 PM, Jeff Higgins wrote:
from JLS-3.8 for JavaSE 9
Two identifiers are the same only if they are identical, that is,
have the same
Unicode character for each letter or digit. Identifiers that have
the same external
appearance may yet be different.
from JLS-3.8 for JavaSE 10
Two identifiers are the same only if, after ignoring characters that
are
ignorable, the identifiers have the same Unicode character for each
letter
or digit. An ignorable character is a character for which the method
Character.isIdentifierIgnorable(int) returns true. Identifiers that
have the
same external appearance may yet be different.
But Java 8 javac did ignore them??
So does Java 7 javac.
Java 6 javac gives me an error when trying to create the class file,
which likely means that it is not ignoring these characters.
Was wondering.
I was wondering when Character,isIdentifierIgnorable(int codepoint)
became available. The earliest javadoc that i can find is 5 and is
available there. A Sun press release from 1997 features
"Global language support based on Unicode 2.0 standards" so maybe
available from then?
On 4/25/2020 12:57 PM, Arne Vajhøj wrote:
On 4/24/2020 11:36 PM, Jeff Higgins wrote:
On 4/24/20 10:24 PM, Arne Vajhøj wrote:
On 4/24/2020 8:37 PM, Jeff Higgins wrote:Maybe not that far back.
On 4/24/20 8:29 PM, Arne Vajhøj wrote:
I think we are in the far out corners of the language.Well, yeah, but still.
And still leaves me questioning motivation for ignorable chars.
We would need to find someone working at SUN back in the mid 90's
to know.
If I were to guess then somebody got the "smart" idea that
the language should not distinguish between names where
the difference could not be seen when type'd/cat'ed and
then someone else later added the \uXXXX feature.
from JLS-3.8 for JavaSE 9
Two identifiers are the same only if they are identical, that is,
have the same
Unicode character for each letter or digit. Identifiers that have the
same external
appearance may yet be different.
from JLS-3.8 for JavaSE 10
Two identifiers are the same only if, after ignoring characters that are >>> ignorable, the identifiers have the same Unicode character for each
letter
or digit. An ignorable character is a character for which the method
Character.isIdentifierIgnorable(int) returns true. Identifiers that
have the
same external appearance may yet be different.
But Java 8 javac did ignore them??
So does Java 7 javac.
Java 6 javac gives me an error when trying to create the class file,
which likely means that it is not ignoring these characters.
http://www-evasion.imag.fr/Membres/Francois.Faure/enseignement/ressources/java/jdk1.3/api/index.html
shows it in 1.3 and says "Since: JDK1.1".
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 295 |
Nodes: | 16 (2 / 14) |
Uptime: | 02:22:25 |
Calls: | 6,642 |
Calls today: | 2 |
Files: | 12,190 |
Messages: | 5,325,499 |