Java always suffers that misconception
Posted: Sun Jun 05, 2005 11:18 am
I think you have some misconceptions about Java and high-level programming in general. Now I make no claims to be an absolute authority but I have been working in the field for quite awhile now with various tools. Each have their own strengths but I think you misunderstand Java's. So let's review
First, I think your claim that java code can easily get "HUGE and slow" is entirely false. It is *much* harder for bad programmers to write bad code in Java (Not that we have any bad programmers here =]) than in C++ or any other natively compiled language.
Secondly, Java provides a massive library of utility objects and frameworks for dealing with most daily development needs. Meaning we won't have to roll our own or deal with tricky integration by using a 3rd party library.
Java pluses:
1. Collections (Lists, Maps, Sets, ect) and Utility classes
2. Abstracted native OS interaction (Files, Streams, I/O, network, GUI)
3. *native* cross platform support (we don't have to do anything to make this run anywhere)
4. Free quality IDEs (Eclipse is great, Netbeans, Sun One).
5. Memory is managed for you.
6. Strict packaging system and OOP implementation promotes clean and well-designed code.
Java Minuses:
1. Huge JRE to install and configure (this is more difficult on windows, IMO)
2. Large memory footprint for standard JRE, but they do have special embedded jvms for portable devices.
I know somebody wants me to put "Swing/AWT are really slow" here, but that just isn't true anymore. Don't believe me? go use OpenOffice or Azureus
C++ pluses:
1. Blisteringly fast (unecessarily fast)
2. teeny-tiny footprint, fine grained memory management
3. Widly used (but declining in recent years).
C++ minuses:
1. Not natively cross-platform compatible. It can be done but it is cumbersome and confusing. Lots of pre-processor marcros and complex compile-time code selection. A toolkit like QT might mediate a lot of this, but I'm not certain.
2. Memory management, unchecked bounds, killer debugging sessions
Now if you wonder why pretty much every major corporation uses a VM based language like Java or MS .NET it is because they deal with a lot of the hassle C/C++ guys used to, so you get to write more application and less framework.
Now if some portion of the code is too slow in Java there is always the option of JNI so you can have your cake and eat it too, but I don't think we'll have a performance requirment anywhere near what would necessitate that. The application I have running currently is just as fast and a lot more functional than anything else I've seen posted here.
I welcome any other thoughts on this platform debate.
First, I think your claim that java code can easily get "HUGE and slow" is entirely false. It is *much* harder for bad programmers to write bad code in Java (Not that we have any bad programmers here =]) than in C++ or any other natively compiled language.
Secondly, Java provides a massive library of utility objects and frameworks for dealing with most daily development needs. Meaning we won't have to roll our own or deal with tricky integration by using a 3rd party library.
Java pluses:
1. Collections (Lists, Maps, Sets, ect) and Utility classes
2. Abstracted native OS interaction (Files, Streams, I/O, network, GUI)
3. *native* cross platform support (we don't have to do anything to make this run anywhere)
4. Free quality IDEs (Eclipse is great, Netbeans, Sun One).
5. Memory is managed for you.
6. Strict packaging system and OOP implementation promotes clean and well-designed code.
Java Minuses:
1. Huge JRE to install and configure (this is more difficult on windows, IMO)
2. Large memory footprint for standard JRE, but they do have special embedded jvms for portable devices.
I know somebody wants me to put "Swing/AWT are really slow" here, but that just isn't true anymore. Don't believe me? go use OpenOffice or Azureus
C++ pluses:
1. Blisteringly fast (unecessarily fast)
2. teeny-tiny footprint, fine grained memory management
3. Widly used (but declining in recent years).
C++ minuses:
1. Not natively cross-platform compatible. It can be done but it is cumbersome and confusing. Lots of pre-processor marcros and complex compile-time code selection. A toolkit like QT might mediate a lot of this, but I'm not certain.
2. Memory management, unchecked bounds, killer debugging sessions
Now if you wonder why pretty much every major corporation uses a VM based language like Java or MS .NET it is because they deal with a lot of the hassle C/C++ guys used to, so you get to write more application and less framework.
Now if some portion of the code is too slow in Java there is always the option of JNI so you can have your cake and eat it too, but I don't think we'll have a performance requirment anywhere near what would necessitate that. The application I have running currently is just as fast and a lot more functional than anything else I've seen posted here.
I welcome any other thoughts on this platform debate.