On 9/10/2011 4:11 AM, Nobody wrote:
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.
Sure there are no global variables, but having one class per file is one
of the big things I hate about Java. Sure it keeps things organized, but
that's a bit to much for me.
--
Take care,
Ty
Web: http://tds-solutions.net
The Aspen project: a light-weight barebones mud engine
http://code.google.com/p/aspenmud
Sent from my toaster.
--
http://mail.python.org/mailman/listinfo/python-list