Sunday, May 17, 2009

Java vs C/C++

It is interesting to note the differences between the Java vs C/C++ schools of thought. I am sure there might be pundits who might have more knowledge and stronger affinity towards either of these languages - still this is my views (ready to be corrected as needed).

Commonality:
  1. It is interesting to note the similarities and dissimilarities of portability of C & Java programs.
  2. Both C & Java are implemented in multiple architectures.
  3. Both languages have big industry support, total ecology support, Application Developer community, standards organizations, training, education, books, tutorials, conferences, seminars - and religious followers
  4. Both are available free of cost (GNU - open soruce)
  5. Both C/C++ code and Java code supports each others calling others and be called by the other language.
C++ :
  1. Some of C++ application domains include systems software, application software, device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games.
  2. Several groups provide both free and proprietary C++ compiler software, including the GNU Project, Microsoft, Intel, Borland and others.
  3. C++ was developed starting in 1979 as an enhancement to the C programming language. C itself is a general purpose programing language developed in 1972. Meaning - this is available for longer time - to be mature as compared to Java.
  4. C provides compilers for each architecture where the same source code can be recompiled as needed. java approach is to provide single compiler and have JRE for different platforms.
  5. C some times provides cross compilers that come in handy for rare/new architectures.
  6. This author believes there are more architectures that has C compilers than the availability of JRE.
  7. C was designed to be compiled using a relatively straightforward compiler, to provide low-level access to memory, to provide language constructs that map efficiently to machine instructions, and to require minimal run-time support.
  8. C was therefore useful for many applications that had formerly been coded in assembly language.
  9. ISO & ANSI standard
Java:
  1. Memory management (NO memory leak that C/C++ programs are notorious for)
  2. Garbage collection
  3. Language is not standardized - pretty much propitiatory spec

Blog Archive