by dicroce · 14y ago · 0 comments
Another factor that complicates the STL is it's approach to generic programming... In my opinion C++ took the purists approach (instead of the pragmatic one)... So, std::list doesn't have a .sort() method... Instead, you can use the sort algorithm on any container that implements the right kind of iterators...
IMHO, C++ needs 2 standard libraries... One for purists, and one for pragmatists... (and the pragmatists will use the STL to implement their standard library, but the pragmatist::list will definitely just have a .sort() method!)...
"Whenever the C++ language designers had two competing ideas as to how they should solve some problem, they said, "OK, we'll do them both". So the language is too baroque for my taste." -- Donald E Knuth