"In 1976, still back in the USSR, I got a very serious case of food poisoning from eating raw fish. While in the hospital, in the state of delirium, I suddenly realized that the ability to add numbers in parallel depends on the fact that addition is associative. (So, putting it simply, STL is the result of a bacterial infection.) In other words, I realized that a parallel reduction algorithm is associated with a semigroup structure type. That is the fundamental point: algorithms are defined on algebraic structures."
This has got to be one of the best outcomes of sickness in computing history!
I love STL, it's the major reason I stick with C++ rather than switching to Java et al. It is extremely well thought-out and most algorithms have clear complexity guarantees. I think it forms an example that libraries in other languages should strive for.
"[Java] might be successful - after all, MS DOS was - and it might be a profitable thing for all your readers to learn Java, but it has no intellectual value whatsoever."
I agree with your opinion about the STL it is indeed very well thought-out and very efficient. It is a shame that concept did not make it into C++0x[1] as it could had help STL usage by preventing the cryptic errors[2]
And oldy but a goody. I like to re-read it every couple of years or so; Stepanov is delightfully bonkers and clearly operating on a rarified intellectual plane that, with binoculars and on a clear day, I can sort of make out the general form of; but the interview is so well done that he comes across as nearly human.
I can't find a date on the article, when was it written? It still speaks of 'the standard' without referencing 0x, is it from the 2000-2004 era or earlier?
The STL is by far the best thought-out algorithm and data structure library I've ever used. I miss it frequently when programming in Python, but in many cases where having optimal algorithms and data structures actually matters, the quantities of data I'm dealing with mandate C++ over Python anyway.
I using STL 8+ years, but mostly because it's a standard, not because of it's good design.
In fact, combination of C++ with STL can be quite ugly and very verbose:
//for each element in vector v
vector<T>::const_iterator it;
for(it = v.begin(); it != v.end(); ++it)
{
...
}
or
// if there is element Value in vector v
if(find(v.begin(), v.end(), Value) != v.end())
{
...
}
I'm not talking about what pain it's, to write your own custom iterators.
I ended up using my own macros to cover verboseness of STL.
Boost also provide some macros to ease working with STL, like FOREACH.
In a nutshell STL is a hack stretching pointer/iterator concept to generic algorithms and data structures on the host OOP language.
The best generic data structures library I saw, was in Clu language. Clu is all about ADT (Abstract Data Types).
Absence of closures in current C++ implementation also not very favorable for generic programming.
I'm surprised this hasn't been posted yet given the rarity of such interviews and the interesting history the STL has.
Coming up with something which was at the time entirely against mainstream practices and imbue it into the standard of a language as widely used as C++ takes a very special kind of person/s.
<harsh> Java is clearly an example of a money oriented programming (MOP). As the chief proponent of Java at SGI told me: "Alex, you have to go where the money is." But I do not particularly want to go where the money is - it usually does not smell nice there. </harsh>
This has got to be one of the best outcomes of sickness in computing history!
I love STL, it's the major reason I stick with C++ rather than switching to Java et al. It is extremely well thought-out and most algorithms have clear complexity guarantees. I think it forms an example that libraries in other languages should strive for.