Undocumented API classes

Recently, I needed a list of strings and was browsing the API header files to see if such a class already exists, other than the more generic BList. And it turns out such a class is already implemented: BStringList. However, it is undocumented, in the sense there is a placeholder for its documentation, presumably created automatically by doxygen, but details are missing.

In this particular case lack of documentation was not a big deal, as it’s easy to figure out what class’ methods do. But since this is not the first time I see such a class (I forgot which ones I’ve seen before), I thought it’s time to ask, just to be sure: Are such classes “safe” to use or experimental ones that might be radically altered or removed in the future are included in the bunch?

If I understand well, undocumented API classes are just that: undocumented, just because none had the time/motivation to write proper documentation for them. Meaning, it’s safe to use such classes, hence that “Since: Haiku R1”.

2 Likes

Usually, the API which is still either private or experimental are exposed under a BPrivate:: namespace, and the headers for these are under headers/private/, not headers/OS/.

Concerning BStringList, it’s defined in headers/OS/support/StringList.h and in default namespace, so you can assume this API is considered as part of public Haiku C++ API.

3 Likes