Nonsense. Patently false. I've written entire generations of source for implementing a wide variety of mechanics for a large number of objects distributed by third parties.And if string changes, to_upper must change.
Let us say, for example, you offer an implementation of string 'ustring' that provides only these methods: 'char at(unsigned long) const', 'unsigned long size() const', void set(unsigned long, char)', 'void resize(unsigned long)'.
With those four functions, and no others, my library, without modification, provides a wide variety of sorting, searching, serialization, and dozens of other transformations. I would have to implement exactly nine manipulators, six getters and three setters, accounting for at most a few dozen lines of code. If the public interface changes, still providing at least the abilities those four functions provide, I would only have to change those nine manipulators. The rest of the library, some 218,000 lines, would remain untouched.
(The trick for those who have played with generic programming: the nine manipulators provide an abstraction for iterators/accessors/etc. Nowhere in the code is, for example, 'some_type::begin()' or 'some_type:perator []' ever used.)
Coupling, in the programming world, has nothing to do with the requirement that some interface must eventually be available. Or do you honestly claim that source using a public interface on three thousand separate occasions is no less coupled than source using a public interface on exactly one occasion?
Precisely, but I wonder, what exactly is your point? It is after all a tool? Are you saying we shouldn't use it?Please. Spare me the latest Silver Bullet hype. Generic programming is just another tool in the toolbox.
Soma