TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Stepanov interview: origin of STL

68 点作者 zeugma超过 14 年前

10 条评论

Jun8超过 14 年前
"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."<p>This has got to be one of the best outcomes of sickness in computing history!<p>I <i>love</i> 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.
评论 #1991969 未加载
jfb超过 14 年前
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.
评论 #1992286 未加载
jemfinch超过 14 年前
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.
anamax超过 14 年前
Stepanov recently gave a talk at Stanford's EE380 about his book <i>Elements of Programming</i>. <a href="http://www.stanford.edu/class/ee380/Abstracts/101103.html" rel="nofollow">http://www.stanford.edu/class/ee380/Abstracts/101103.html</a> <a href="http://ee380.stanford.edu/cgi-bin/videologger.php?target=101103-ee380-300.asx" rel="nofollow">http://ee380.stanford.edu/cgi-bin/videologger.php?target=101...</a>
nivertech超过 14 年前
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:<p><pre><code> //for each element in vector v vector&#60;T&#62;::const_iterator it; for(it = v.begin(); it != v.end(); ++it) { ... } </code></pre> or<p><pre><code> // if there is element Value in vector v if(find(v.begin(), v.end(), Value) != v.end()) { ... } </code></pre> I'm not talking about what pain it's, to write your own custom iterators.<p>I ended up using my own macros to cover verboseness of STL. Boost also provide some macros to ease working with STL, like FOREACH.<p>In a nutshell STL is a hack stretching pointer/iterator concept to generic algorithms and data structures on the host OOP language.<p>The best generic data structures library I saw, was in Clu language. Clu is all about ADT (Abstract Data Types).<p>Absence of closures in current C++ implementation also not very favorable for generic programming.
pmr_超过 14 年前
I'm surprised this hasn't been posted yet given the rarity of such interviews and the interesting history the STL has.<p>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.
WalterBright超过 14 年前
Stepanov's STL has inspired the design of ranges and algorithms in the D programming language standard library. <a href="http://www.digitalmars.com/d/2.0/phobos/std_algorithm.html" rel="nofollow">http://www.digitalmars.com/d/2.0/phobos/std_algorithm.html</a>
hsmyers超过 14 年前
Best quote 'Occam was a strange fellow anyways. As the editor of his Opera Omnia Gideon Gal used to say: "But the fellow was really mad!" '
zeynel1超过 14 年前
"Answer: Yes. STL is not object oriented. I think that object orientedness is almost as much of a hoax as Artificial Intelligence...."
J3L2404超过 14 年前
&#60;harsh&#62; 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. &#60;/harsh&#62;