-
Book Overview & Buying
-
Table Of Contents
Software Architecture with C++ - Second Edition
By :
Modularity is a fundamental aspect of all successful large programs.
– Bjarne Stroustrup, The C++ Programming Language, Special Edition, 1998
C++ programmers have been facing the shortcomings of the preprocessor-based approach of including header files through the #include system. These include weak encapsulation, heavy macro usage, and slow compilation. C++ modules change the way code is organized and compiled, which helps resolve these issues. They replace textual inclusion with a structured binary interface, which improves code isolation and compilation speed and provides clearly defined interfaces.
However, it is difficult to predict when the С++ community will replace header files in favor of modules, as maintaining backward compatibility with older projects continues to slow down the transition. Therefore, the approach where C++ libraries provide both headers and module interfaces may become a...