Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Quick Qeustion

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 328
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pat Flickner
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
We don't have time for this. We've gotta save the moon! Or check this out:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!