This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
This isn't exactly a Java question, but the Head Guy 'round her may know:
Someone commented to me that C was much lighter than Java. I'm trying to figure out why, but I suspect that he's used only the awt gui components. And he's using an interface for compiling. I pointed out that if he were to compile at the command prompt, he'd see something far different than what he saw using what his school provided.
I don't mean to start a huge controversy. That isn't my intention. I'd just like some info to be certain because if he speaks this in the right ear, they may start asking why we're using java instead and I want to be able to have some real facts behind me.
Someone commented to me that C was much lighter than Java. I'm trying to figure out why, but I suspect
Is there anything which stops you from asking that person a couple of questions? Like: How do you know if C is lighter than Java? In which way, you think, C is lighter than Java? What do you mean by "lighter"?
Not having such answers, we can keep guessing forever about which kind of "lightness" is important for your project, and which tool gives more of it...
In many meaningful senses, C is "lighter" than Java. C is, after all, really just thinly disguised assembly language. Although every platform has a C runtime library, simple programs don't actually even need to link with it, so a meaningful C program can be no more than a few bytes of code, and use only a few bytes of core. In contrast, even the smallest Java program has to run on a JVM, which is generally a quite large program, and which needs a multi-megabyte heap just to print "Hello, World."
Now, "lightness" is now a criterion that Java has ever tried to compete on, and frankly, it's not something that most folks really need to worry about. Once you get up to realistic-sized programs, any differences in heap and code size tend to even out. If you just need to write a tiny program, Java was never intended to be the best choice. But if you're running a bigger project and things like maintainability, debuggability, scaleability (and all the other "ilities" ) matter, then Java is a clear winner.