3 ms·
Because you would have to come up with a naming convention ahead of time.
by justin_vanw 11y ago
Because you would have to come up with a naming convention ahead of time.
- tptacek 11y agoAnd you're suggesting that nowhere in what used to be called the C++ Standard Template Library is there a place where they didn't have to come up with a naming convention for functions? I think you may have the causality swapped here; I think <algorithm> looks the way it does because they limited themselves to things that could be easily expressed with operators --- for a long time, to the detriment of the language; see: STL associative containers, operator<, and the longstanding lack of a standard hash table.
- blub 11y agoHow was <algorithm> preventing the introduction of a hash table? The hash function is a template parameter, predefined for standard types, no operator needed. Josuttis claims that hash tables didn't make it in C++98 due to lack of time.