| Article: |
Readable Java 1.5 | |
| Subject: | interesting, but... | |
| Date: | 2003-09-29 15:26:12 | |
| From: | anonymous2 | |
|
Response to: interesting, but...
|
||
|
I tend to think that clearer syntax is much more important than the difficulty of writing the compiler. After all, many more people write Java code than write Java compilers. Is this one of the major reasons Sun did not want to use the "in" keyword?
|
||
Showing messages 1 through 1 of 1.
-
interesting, but...
2003-12-20 06:54:24 anonymous2 [View]



use any of the keywords as variables or
method names. Making an exception for "in"
isn't just a matter of making it "difficult"
to write the compiler, it's a radical change
in the language structure that would require
the lexer to be context-sensitive. Sun would
(justifiably) never ever make such a change, so
it's pointless to debate the value of an "in" keyword.
Someone suggested "from". "of" is another
possibility. But it's not like Sun didn't
consider these -- they almost certainly did,
and rejected them because there may be programs
that use them as variable names. Thus, they
chose the ":" syntax, and it's very unlikely
that they're about to change their minds.