Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Java have a central API documentation, but not C++?

Tags:

java

c++

api

Question pretty much explains it all. I've been wondering why Java has nice, organized and centralized API documentation, but C++ library definitions seem to be scattered across the internet?

Is it because Sun put some effort behind making Java API documentation easy and accessible? Thanks in advance.

like image 971
chrislgarry Avatar asked Nov 06 '11 05:11

chrislgarry


2 Answers

What you call "nice, organized/centralized, API" for Java is probably the documentation of Oracles's official implementation. C++ implementations also have their own documentation, for instance, GNU's implementation is well documented in http://www.gnu.org/s/libc/manual/ (the C part), and in http://gcc.gnu.org/onlinedocs/libstdc++/ (the C++ part; see section "API and Source Documentation"). You will also be able to find in MSDN Library the full documentation for Microsoft's C++ implementation.

You probably find Java API more concise and well documented because there is only one serious implementation of it (Oracle's original implementation), making its documentation the very resource for the language itself.

On the other hand, C++ is a standard, implemented by a wide variety of vendors, and many documentation resources are not even based on any specific implementation, but in the standard itself. In the end, different C++ resources on the Internet tend to outstand others in some areas. For instance, cplusplus.com concentrate good documentation about <iostream>, <string> and beginners topics, while the documentation of SGI's implementation of STL (http://www.sgi.com/tech/stl/) became the reference resource for STL, probably because of its completeness and very good organization.

like image 170
lvella Avatar answered Sep 24 '22 09:09

lvella


C++ has a language specification, and a set of standard libraries.

Java also has a language specification, and also has set of standard libraries.

I don't really see any fundamental difference between the C++ standards and the Java standards, except that Java also comes with a standard implementation (from Oracle, formerly Sun).

PS: Admittedly, Java has a standard API for GUI's (Swing), and C++ doesn't. But do you really want to force a "standard" like Windows MFC, to the exclusion of alteratives like Qt?

like image 31
paulsm4 Avatar answered Sep 22 '22 09:09

paulsm4