4 ms·
As an example of C++ making code reuse a lot easier, consider the Windows platform from a developer's perspective. Before C++, there was this huge library calle
by khitchdee 9y ago
As an example of C++ making code reuse a lot easier, consider the Windows platform from a developer's perspective. Before C++, there was this huge library called Win32 in C that contained several hundred functions and data structures to access the services of the platform. Since it was not object oriented, there was a fat book by Charles Petzold, which was like a Bible for windows programmers that described how each of the functions related to each other, in what sequence to call them and a bunch of stuff that was not even documented by Microsoft.
Once C++ came, there was a library called MFC which was object oriented and hence a lot better documented and organised and now there's .NET.
The organization of functions into objects makes it a lot easier to understand systems software specially if it's very large. Also the ability to subclass means you can take the base functionality of "template" classes provided by a library and subclass them to extend them with what you need. This was not as easy with C where you had to rely on sample code for this purpose. The Petzold book had a ton of sample code.