C++ has been substantially improved since Java was first implemented, so some of the original advantages of Java over C++ have been reduced. Strong typing is now much more effective, and less trivially defeated, in C++.
- However, some extensive advantages of Java remain:
- Garbage collection built into the language.
- Synchronization built into the language
- Threading built into the language
- A lot more debugging information rolled into the binaries, making crashes easier to debug
- Late linking makes some development and deployment smoother.
- Platform-independent binaries, and rigorous code checking, make it possible to safely deploy code within another process (e.g. user-supplied builtins, application servers)
Some libraries can be obtained for C++ to overcome some of these, though generally in a platform-dependent way, and since libraries will vary from project to project it's harder to reuse code from different paradigms.
C# incorporates a lot of Java's concepts, fixing up a few of Java's mistakes, and the two languages are actually pretty similar. C++ looks increasingly Java-like over time; the latest round even begins to introduce a garbage collection, multithreading, a real null, etc.
0 comments:
Post a Comment