Is C++ really a bigger language than Java?
Time and again I keep coming across people who complain that C++ is difficult to learn and use because it is a BIG language. Agreed that it is a bigger language when compared to something like C, but they say this when comparing it with the Java language! I don’t know which versions of C++ and Java these people want to compare with each other when making such a claim(C++ around 1995 was definitely bigger than Java at the same time, but it hardly makes any sense to compare those versions of the languages today, just as it made no sense even then) but if we compare the current versions of these two languages, I don’t think there is any big difference between the two in terms of number of features. Let’s a have a look at the important features from the two languages in their most recent versions:
C++
Java
I have ignored the minor feature differences from both the languages, like static import in Java and default argument values in C++ as they are too many to list here and are almost equal in number in both the languages. The above table may not suggest that both the languages are exactly the same in number of features but it definitely suggests that there isn’t a big difference between the two. Java language is ready to become still bigger with Java 6 and will go through more such expansions in the next few years, where as only a small number of new features are going to be added to the C++ Language in its next standard(to be released around 2010).
I haven’t included the standard libraries of these languages in the comparison, not even I/O or File streams, but the standard library of Java is clearly bigger than that of C++. It is a different case altogether with the libraries though: you need to learn only those libraries which you want to use in your applications. In that sense, the bigger the standard library, the better it is, provided that the other aspects of the libraries( usability, flexibility, extensibility, etc) are comparable.