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.
The moose likes Beginning Java and the fly likes Quick Qeustion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Quick Qeustion" Watch "Quick Qeustion" New topic
Author

Quick Qeustion

Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
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.

Thanks.
Dmitry Melnik
Ranch Hand

Joined: Dec 18, 2003
Posts: 328
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...
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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.


[Jess in Action][AskingGoodQuestions]
Pat Flickner
Ranch Hand

Joined: Nov 17, 2003
Posts: 173
Thanks! I was close, but not like that. Now I can have a clear, clean argument the next time I hear how light C is.

Pat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Quick Qeustion