[Kaffe] ease of use patch.

Jules Bean jmlb2 at hermes.cam.ac.uk
Wed Feb 24 05:19:25 PST 1999


On 24 Feb 1999, Alexandre Oliva wrote:

> On Feb 24, 1999, Moses DeJong <dejong at cs.umn.edu> wrote:
> 
> > It is not legal to have a class named java.
> 
> You sure?  It might be just a bug in JDK's handling of conflicts
> between classnames and package names.  And then, even if javac can't
> compile it, the JVM might accept such a class name.

It makes the java grammar more complex.

It would require extensive use of lexical states to allow keywords in
every location where it's unambiguous.

For example, C could probably allow variables called 'int', in the sense
that that does not make things ambiguous.  However, it would make the
grammar more complex.

In general, language designers make these compromises, which don't harm
the programmer much, in order to make compilers easier to write and debug,
and faster in operation.

Jules
 
/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules at jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules at debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2 at hermes.cam.ac.uk        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/



More information about the kaffe mailing list