W
werasm
Roland said:Templates provide no separation between interface and implementation.
The template interface is the template implementation (and vice
versa). A template-only (almost) library cannot hide the "complexity
in implementation". This is an insurmountable problem for all template
libraries, not only Boost.
I don't entirely agree with this. Whilst templates don't promote
compilation dependency, interface is not determined by compilation
dependency, but by what is publicly usable. True that there is no
physical seperation between interface and implementation (but interface
still exists and is concise). Apart from that, seperation can often be
established by using combination of dynamic and static polymorpishm.
The command pattern and Alexandrescu's functors are example of this.
Furthemore, most of the idioms implemented in boost are so well
established, with narrow concise interfaces that never change (e.g.
they promote single responsibility), therefore the strong dependency is
irrelevant, this being the case for the STL as well. If an interface is
cast in concrete, it no longer requires to be seperated from
implementation. Many idioms in boost are so narrow that they are cast
in concrete.
Kind regards,
Werner