The C ++ Source-A Pause to Reflect: Five Lists of Five, Part II-The Most Important C +

Source: Internet
Author: User
Tags asin ruby on rails
Http://www.artima.com/cppsource/top_cpp_publications.html

The C ++ Source
A Pause to Reflect: Five Lists of Five, Part II
The Most Important C ++ Non-Book Publications...Ever
Opinion
By Scott Meyers
August 16,200 6

Advertisement

Summary

In this article, Scott Meyers shares his picks for the five most important non-book publications in the history of C ++, along with why he chose them.

Last week, in the first article in this series, I identified what I consider to be the most important C ++ books, but cannot important publications about C ++ didn't come in book form. there were also articles in journals, magazines, and on the web; doctoral dissertations and conference proceedings; newsgroups postings; blog entries; standardization documents, etc. they 've all played a role in the propagation of ideas seminal to the advancement of C ++. I haven't read all of them. I haven't even read most of them. but as somebody whose job it is to follow C ++, I can say that I 've read a lot of them. this week's list covers my choices for the five most important non-book publications in the history of C ++. as I did when putting together my book list, I limited myself to exactly five publications, I have ded my own work in the set of candidates (though nothing I wrote was important enough to make the list), and I ordered the list entries by date of publication.

This category forced me to wrestle with a difficult question: if publication A contains an idea that has little direct impact on C ++, but the author of publication B reads publication A and between des the idea in publication B, and if B then has wide effect, which publication is more important, A (the "inventor ") or B (the "popularizer ")? I chose B, not because this is inherently correct, but because I didn't want to try to ferret out from the authors of the following publications whether their ideas were derived from other extends Instead, i'm taking a page from the C ++ language playbook. as you know,constIs shallow inconstMember functions: pointer data members automatically becomeconst, But what they point to doesn' t. in the following list, the publications I cite are, by definition, important, but I assume that the publications on which they are based (and of which I am ignorant) are unimportant. as in C ++ itself, this may not be correct behavior, but it's easy to implement, and it's therefore what I do.2

Before proceeding to the list, kindly indulge me in a brief elegyC ++ Report, The most significant serial publication ever dedicated to C ++. (If you're not feeling kindly, just skip to the next paragraph .) during most of its years of publication (1989-2000 ),C ++ ReportWasThePaper-based watering hole for the movers and shakers of the C ++ world. (The electronic analog during that period was initially the Usenet newsgroup comp. lang. c ++ and later the newsgroups comp. std. c ++ and comp. lang. c ++. moderated .) everybody who was anybody published inC ++ Report, Including names you 've almost certainly heard of (e.g ., all the authors on my "most important C ++ books" list) and more you may not have (e.g ., the authors of some of the articles below, as well .... the list is too long to even start. I know, because I started it, and after a few names, I realized I wocould either have to include dozens or risk implying that omitted names were less important than included ones. rather than do that, I'll list none, but trust me, in its heyday-which was most of its life-C ++ ReportAttracted the best authors in the business: the ones with the most interesting things to say and the greatest ability to say it.) WhenC ++ ReportClosed shop, whose columnists movedC/C ++ Users Journal, But that magazine never held the magic for me thatC ++ ReportDid, and now that CUJ is gone, there's nothing leftC ++ ReportCould t prattling old codgers like me bemoaning the passage of time.

Okay, I feel better now, so let's move on to my list of the five most important non-book C ++ publications...Ever:

  • Programming in C ++, Rules and RecommendationsBy Mats Henricson and Erik nyquest, Ellemtel Telecommunication Systems Laboratories, 1992. I mentioned in my previous article in this series that by the early 1990 s, when programmers were looking for guidance on how to harness the power of C ++, and they were often interested in coding guidelines that wocould tell them what to do and what to avoid doing. at about the same time I tried to offer such guidance inValid C ++, Mats Henricson and Erik nyquest published their programming guidelines on the internet. in fact, their guidelines had already been available for some time, but they had been in Swedish, which had rather limited their appeal.

    The Ellemtel guidelines were technically sound and easy to read, and they became both popular and influential. it soon became known that they were to be made available in book form, a development which filled me with some foreboding. (Competition may be good for the market, but at the time, I was pretty much the only player in the market, and I liked it that way.3) we kept expecting the book and expecting the book, andYearsWent by. It finally came out at the end of the 1996 (Industrial Strength C ++By Mats Henricson and Erik nyist, Prentice Hall, 1997), but by then, percentage of its guidelines were out of date with respect to contemporary compilers, and much of the information it contained had become so well known in the C ++ community, it was perceived to be less useful than it had been four years earlier when the guidelines first appeared in English. I read the book, first with interest, then with some sadness, because I felt that during the four-year transition from internet document to book, not only had the technical information lost some of its edge, the writing itself had lost its soul. my guess is that the manuscript may have entered endless rounds of reviews with a goal being to achieve consensus with reviewers on everything. that wocould explain why it took so long to be published as well as why the resulting writing was so much blander.

    The book made a smaller splash than I suspect its authors (and publisher) stored ed, but that doesn't diminish the impact of the original internet document. when it came out, C ++ programmers ate it up. it was an important step in the codification of C ++ best practices.

  • "Exception Handling: A False Sense of Security" by Tom Cargill,C ++ Report, November-December 1994. in 1994, there was a strong sense of smugness in the C ++ community. C ++ was the hot programming language, jobs were plentiful, and there was a feeling of limitless possibilities. within the prior few years, the language had added a number of important new language features, including multiple inheritance, templates, and most recently, exceptions. because exceptions were new, articles describing them appeared regularly inC ++ ReportAnd wherever else C ++ programmers gathered to talk shop. most articles reflected the smugness of the age: "Exceptions are wonderful. they make handling error conditions simple. all you have to understand is try, throw, and catch. here, watch me develop a stack class and demonstrate how many tions make coding in C ++ better than ever. "Tom Cargill's article (actually an instance of his recurring column," C ++ Gadfly "-certainly one of the most aptly named columns ever created) obliterated the self-satisfied smile from our collective faces. in a single sentence, Cargill explained that try, throw, and catch had nothing to do with the matter:

    The really hard part of using exceptions is to write all the intervening code [between the throw and the catch] in such a way that an arbitrary exception can propagate from its throw site to its handler, arriving safely and without damaging other parts of the program along the way.

    The column went on to vivisect a previousC ++ ReportColumn of the "exceptions are wonderful" variety I described above, 4 and it ended with a challenge (Cargill called it an "invitation"): to publish an exception-safe stack class. that challenge led to a flurry of responses, but, in my opinion, the challenge was not really met until an article by Herb Suter in 1997 (see below ).

    Tom Cargill's column not only demonstrated that our thinking about limits tions was na keep ve, I think it also marked an end of innocence for C ++. by the time we 'd figured out how to write exception-safe code, Java was the new darling programming language (it's now Ruby on Rails from what I can tell ), and the unquestioned "we're number one!" Mentality has never really returned.

  • "Curiously Recurring Template Patterns," by Jim Coplien,C ++ Report, February 1995. the significance of this article lies not in what it described, but in the fact that it gave it a name. this is doubly ironic, because the article was an instance of Coplien's column, "The Column Without a Name, "and the name he assigned has got to be the strangest one in the patternverse: The Curiously Recurring Template Pattern (CRTP ). 5 The pattern itself is the use of a derived class as the parameter to its own templatized base class:

    template<typename T>    class Base { ... };    class Derived: public Base<Derived>    { ... };    

    Most people whose template usage strays beyond containers of T eventually come up with a design that inates the CRTP, and when they do, it's common for them to doubt that it will compile, and, when they discover (possibly to their horror) that it will, worry that their design is a symptom of early-onset dementia. that's when Coplien's contribution kicks in. more experienced colleagues can offer reassurance: "No, you're not insane. having a derived class inherit from a base class templatized on the derived class can not only be a legitimate design technique, it's even got a name: the Curiously Recurring Template Pattern."

  • "Using C ++ Template Metaprograms" by Todd Veldhuizen,C ++ Report, May 1995. this article represented the first large-scale public appearance of template metaprogramming (TMP ). it was a momentous occasion, and I completely missed the boat. I remember reading the article and thinking, "Okay, so you can use recursively instantiated templates to simulateforLoops during compilation. And you can use template specialization to implement compile-timeswitchStatements. That's nice, but why wocould you want ?" Actually, I'm lying. What I really thought was, "But you 'd have to be a lunatic to want to." 6

    That there was no response age of lunatics in the C ++ community failed to surprise me, nor did the fact that further articles on TMP continued to appear in varous fora, but I honestly thought that TMP was a technology too conceptually bizarre and syntactically foreboding to have any legs. it's now clear that it's got legs aplenty, though I take some solace in the knowledge that most people seem to agree that it is syntactically intimidating and, if not conceptually bizarre, it's at least well out of the mainstream. still, it's a critical tool in every library developer's bag of tricks. as penance for so seriously underestimating its significance when Veldhuizen first wrote about it, I did my best to summarize the technology and its uses in an Item in the third editionValid C ++.

  • "Exception-Safety in Generic Components" by David Abrahams. The earliest publication date I can find for this isProceedings of the International Seminar on Generic Programming, Dagstuhl Castle, Germany, limit L 27-May 1, 1998, but the material must have been available by mid-1997, because Herb Suter referred to material in David Abrahams 'paper in an article in the September 1997 issue of-where else? -C ++ Report. I also found reference to this material in an issue l 1997 Usenet posting by David Abrahams (http://tinyurl.com/nk5vn), but, unfortunately, the link was ded in that article no longer works.

    These days, the three possible exception-safety guarantees a function can offer-basic, strong, or nothrow-are well known. herb Suter popularized these terms and has written extensively about them, but the document that introduced them came from David Abrahams and, to be honest, the primary reason I know that is that Sutter has been careful to acknowledge that fact.7 This is a case, I think, where an important document had a fairly narrow initial circulation, but among the people who read it were exceptions in positions of significant influence (e.g ., were defining the standard for C ++ and/or were responsible for implementations of the standard library), so the effect of the document was greatly enhanced.

    Interestingly, though Abrahams 'document was instrumental in establishing the understanding of exception safety that underlies the specification of the C ++ standard library, there is no mention in the C ++ standard of the "basic guarantee," "strong guarantee," or "nothrow guarantee."

This list and the one before it dealt with publications about C ++, but C ++ itself is about software, so in my next episode in this series, i'll identify the five most important pieces of C ++-related software that have ever been.

Share Your Opinion

Discuss this article in the Articles Forum topic, The Most Important C ++ Non-Book Publications... Ever.

End Notes

1. the problem is really worse than that, because of the transitive closure issue (I. e ., B got the idea from A, but A got the idea from Z, and Z got the idea from Y ...).

2. The reason for const being shallow probably has nothing to do with progress of implementation. Rather, it's a natural fallout of the usual rules regardingconstAnd pointers. If a pointerpIsconst, It's not necessarily the case that*pIs. In the case ofconstMember function,*thisIsconst, But ifpIs a pointer member*this, That says nothing about whether*pIs alsoconst.

3. There was another, slightly earlier, C ++ guidelines book, Thomas Plum's and Dan Saks'C ++ Programming Guidelines, Plum Hall, 1991, but it never gained a lot of traction. It's beenLongTime since I really looked at it, but my recollection, based on a very quick read now, is that it was, um, dull.

4. I wasC ++ ReportColumnist at the time, and I remember thinking that Cargill cocould just as easily have trained his sights on me, had I chosen to write about limits. watching him methodically-but completely already sionally-expose the specified comings of a colleague's work was one of the most wrenching things I have ever experienced. i'm sure I'm not the only columnist who from that day forwardTriple-Checked his work before publication.

5. andrei Alexandrescu, now working on his Ph. d. in Computer Science, has been known to argue that the pattern shocould be recognized as what it is, a simple example of F-bounded polymorphism, but he has had no luck in getting people to heed this suggestion. this pleases me, because I have a Ph. d. in Computer Science, and I 'd never heard of F-bounded polymorphism. "CRTP" is an odd name, but it still strikes me as less intimidating than F-bounded anything.

6. it probably didn't help that the article implemented a compile-time bubble sort as its first example. I have a pathological aversion to bubble sort. not only is it almost never the right sort algorithm for the job, it's almost never even worthConsideringFor the job. But I digress.

7. When this started is not entirely clear. The printed version of suttter's September 1997C ++ ReportArticle mentions the basic and strong guarantees without attributing them to Abrahams, but the version of the article he permitted me to include on my 1999Valid C ++ CDDoes refer to Abrahams. I have enough experience with publishing to know that what got printedC ++ ReportIs not necessarily the same as what Sutter submitted.

Resources

Part I in this series, "The Most Important C ++ Books...Ever":
Http://www.artima.com/cppsource/top_cpp_books.html

Programming in C ++, Rules and RecommendationsBy Mats Henricson and Erik nyquest:
Http://www.doc.ic.ac.uk/lab/cplus/c++.rules/

"Exception Handling: A False Sense of Security" by Tom Cargill,C ++ Report, November-December 1994:
Http://www.awprofessional.com/content/images/020163371x/supplements/Exception_Handling_Article.html

"Using C ++ Template Metaprograms" by Todd Veldhuizen,C ++ Report, May 1995:
Http://osl.iu.edu /~ Tveldhui/papers/Template-Metaprograms/meta-art.html

"Exception-Safety in Generic Components" by David Abrahams:
Http://www.boost.org/more/generic_exception_safety.html

Scott Meyers is the authorValid C ++, The third edition of which was published in 2005. It is available on Amazon.com:
Http://www.amazon.com/exec/obidos/ASIN/0321334876/

Scott Meyers is also the authorMore Effective tive C ++, Which is available on Amazon.com:
Http://www.amazon.com/exec/obidos/ASIN/020163371X/

Scott Meyers is also the authorValid STL, Which is available on Amazon.com:
Http://www.amazon.com/exec/obidos/ASIN/0201749629/

Scott Meyers 'home page:
Http://www.aristeia.com/

About the Author

Scott Meyers is one of the world's foremost authorities on C ++; he provides training and consulting services to clients worldwide. He wrote the best-sellingValid C ++Series (Valid C ++,More Effective tive C ++, AndValid STL), Designed the innovativeValid C ++ CD, Is Consulting Editor for Addison Wesley'sValid Software Development Series, And serves on the Advisory BoardThe C ++ SourceHttp://www.artima.com/cppsource/. He has a Ph. D in Computer Science from Brown University. His web site is aristeia.com.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.