C++ is one of the most powerful language and will be used for a long time in the future inspite of emergen
of Java. C++ runs extremely fast and is in fact 10 to 20 times FASTER than Java. Java runs very slow
because it is a byte−code−interpreted language running on top of "virtual machine". Java runs faster with
(Just−In−Time) compiler, but it is still slower than C++. And optimized C++ program is about 3 to 4 tim
faster than Java (with JIT compiler). Then, why do people use Java? Because it is pure object oriented and
easier to program in Java, as Java automates memory management, and programmers do not directly deal
with memory allocations. This document attempts to automate the memory management in C++ to make i
much more easy to use. The library given here will make C++ look like Java and will enable "C++" to
compete with Java language.
Because of manual memory allocations, debugging the C++ programs consumes a major portion of time.
This document will give you some better ideas and tips to reduce the debugging time.
Language choice is very difficult. There are too many parameters − people, people skills, cost, tools, politics
(even national politics) and influence of businessmen/commercial companies. The best language based on
technical merits does not get selected simply due to political decisions!
Java is much closer to Ada95 than C++. Java is derived from Ada95. Ada95 gets the maximum points as per
David Wheeler's Ada comparison chart. Ada got 93%, Java 72%, C++ 68% and C got 53%. C++ and Java are
closer in points(only 4% difference), hence Java is not a very big revolution as compared to C++. On other
hand, Ada is a very big revolution and improvement over C++. The scores are like 4 students taking exams
and student with highest score is Ada (93%). Who knows? Perhaps in future Ada95 will replace Java!!
Development costs of Ada is half of C++ as per Stephen F. Zeigler. Ada95 is available at −
Ada home http://www.gnuada.org. •
Google Ada index •
Since C++ programmers are abundant, it is recommended you do programming in object−oriented "C++" for
all your application programming or general purpose programming. You can take full advantage of object
oriented facilities of C++. The C++ compiler is lot more complex than "C" compiler and C++ programs may
run bit slower than "C" programs. But speed difference between "C" and "C++" is very minute − it could be
few milli−seconds which may have little impact for real−time programming. Since computer hardware is
becoming cheaper and faster and memory 'RAM' is getting faster and cheaper, it is worth doing code in C++
rather than "C" as time saved in clarity and re−usability of C++ code offsets the slow speed. Compiler
optimizer options like −O or −O3 can speed up C++/C which is not available in Java.
Nowadays, "C" language is primarily used for "systems programming" to develop operating systems, device
drivers etc..
Running Codes
http://en.wikipedia.org/wiki/Comparison_of_Java_and_C%2B%2B
No comments:
Post a Comment