On Fri, 09 Sep 2011 11:37:44 +1000, Chris Angelico wrote: >> The Java compiler also acts as a "make" program. If it doesn't find >> a .class file for a needed class, it will search for the corresponding >> .java file and compile that. So to compile a complex program, you only >> need to compile the top-level file (e.g. HelloWorld.java), and it will >> compile everything which is required. No Makefile is needed, as the >> relationship between classes, object files and source files is fixed. >> > > If that's the entire benefit, then I think this is a rather hefty > price to pay for the elimination of a makefile.
It also eliminates the need for TAGS files, browser database (PDB) files, etc. Once you know the class name, all of the filenames follow from that. I suspect that the one-to-one correspondence between classes and .class files is mostly technical (e.g. Java's security model). The one-to-one correspondence between class files and source files could probably be relaxed, but at the expense of complicating the IDE and toolchain. I never saw it as a problem, given that Java is fundamentally class-based: there are no global variables or functions, only classes. -- http://mail.python.org/mailman/listinfo/python-list