Yes C++ is a multiparadigm language and currently supports 4 paradigms.
I didn't know that.
But certainly it's not something everyone agrees on.
For example, I absolutely do not agree that C++ "supports" modular
programming, since there _is_ no module concept in C++. However,
sure: namespaces
put the public interface of your "module" into one namespace,
and the implementation into a second which drags in the interface
from the first. you'll end up with strict encapsulation of
functions, types, .. in one scope
C++ allows you to fake some of it by strictly following some set of
no need to fake .. namespace/using is all you need
i guess the keywords are a bit distracting .. take those
synonyms:
module := namespace
import := using
conventions (header file guards etc.). That's in the same spirit
as assembler language supports object-orientation (even old TASM).
headers are indeed a pain in the ass. "all" that would be needed
to get rid of them would be the compiler to spill out full static
type information into an object file for the linker to consume.
in .NET/CLI, thats "manifests"
in COM thats type libraries (TLBs)
in Java its in the class files itself
the important point to note of course: headers are not required
or defined by the C++ language standard, just happen to be
a widely deployed implementation artifact.
IMHO the two biggest failures of C++ standardization:
1. lack of ABI standardization
2. lack of full static type, standardized (per platform)
information in object files
1. would have prevented MS from inventing COM (a workaround for 1.)
2. would considerable lower complexity in build process