Click here to Skip to main content
15,894,284 members

A real solid and comprehensive library for C++?

Source: CodeProject     Posted by Kent Sharkey    Thursday, March 24, 2016 6:00pm    
That's because all the "real" C++ developers feel the need to write their own. For each project.

In C++ we have std and boost, but in some point they are confusing and their functionalities are somehow overlapped, which introduced a much harder learning experience compared to other languages.



Back to all news items

 
GeneralPoco Project Pin
Anthony Fountaine27-Mar-16 5:19
Anthony Fountaine27-Mar-16 5:19 
GeneralThere is a foundation - after that the sky is the limit Pin
john morrison leon27-Mar-16 1:37
john morrison leon27-Mar-16 1:37 
The C run-time library (very old and stable) and the C++ standard library. Those are the libraries that come with the language and are portable across implementations. It could be said though that the C++ standard library was designed with more advanced programmers in mind.

Boost isn't part of the standard but it has a track record of developing things that go on to become part of the standard library. Boost also has a track record of extreme compiler choking complexity and much of that material did not make it into the standard library. Use std not Boost as your basic library.

C++ isn't tied to an operating system nor to a virtual machine so it doesn't provide OS or GUI libraries as standard. These have to be sought elsewhere. For Windows I used MFC, WTL and more recently one that I have developed myself that sits on Win 32. This of course brings us to:

“That's because all the "real" C++ developers feel the need to write their own. For each project. “

It is a slight exaggeration. Yes we like to express the executive control of our programs at a high level (that is clean readable and understandable code). This does tend to mean writing wrappers specifically tailored to each project but they are just shells that wrap the complexities of other libraries. Sometimes the wrapper ends up more complex that what it wraps, something Microsoft has been very guilt of. This is of course, poor programming and it happens when programmers lack the power or the wit to declare the effort as self defeating.

It is wise to build the bulk of your code using established standard libraries, both pure language and OS/GUI related. Many programming environments insist on this. The problem is that strict adherence to standards can lead to consistently over contrived and sub optimal design. Over time, experienced programmers start to see this and provide alternatives or enhancements that facilitate more natural or optimal design.

I stand guilty as hell, as a one man independent library builder. I just got tired of consistently doing things the wrong way and having coding hazards not properly covered. Here are the ones I have published and encouraged others to adopt:
I felt that the danger of secondary references to volatile objects becoming invalid was turning programmers away from C++ and had never been solved, so - Smart observers to use with unique_ptr[^]
It seemed that Boost- Units had not been widely adopted because it was perceived to be a lot of trouble to take on. I found it so too, so - Units of measurement types in C++. Using compile time template programming.[^]
I became tired of the labour of dialog design and the fragility, opacity and lack of portability of the IDE generated resources associated with it, so - Windows dialog design in C++ without dialog templates.[^]

As an unaccredited source I know that I have to write the code in a way that others can read and understand so they can reassure themselves that it is build on secure foundations. For the most part you really do need to rely on the scrutiny of experts that you get with Boost and the Standard Library.
GeneralHow about Qt? Pin
ed welch26-Mar-16 5:20
ed welch26-Mar-16 5:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.