A c ++ book that surpasses expectations-A Brief Comment on the guide to full development of boost libraries: go deep into the C ++ standard library

Source: Internet
Author: User

Lai Yonghao (http://laiyonghao.com)

As a regular C ++ProgramClerk, I often laugh at myself as a patient with Stockholm Syndrome and use python to write lazyCodeYou will miss the abuse of Writing C ++ code before. But when I really want to write some C ++ code, I will miss the freedom that python has brought to me. This may be the so-called difficulty of luxury. Fortunately, with boost, sometimes it even makes me feel that C ++ can be written as elegant as Python. It is probably because the group committees of boost have always had high requirements, good libraries, and good documentation, so they have been reading online documents for a long time as a way to learn. Later, some Chinese people translated a boost book, which is a great book, but the corresponding boost version is outdated, and there is an inevitable loss of information during the language conversion process. In the past few years, Alai and others have spontaneously organized and translated all boost documents and related books, and followed up on versions in a timely manner, which is a rare and good material. Despite the convenient resources, I still look forward to reading boost books from Chinese people. I believe Chinese people have a better understanding of the C ++ style and level we use, able to write books that are more suitable for our real needs. Therefore, the "Full Development Guide for Boost libraries: go deep into the C ++" quasi "standard library (hereinafter referred to as the" Boost Guide ").

Although I look forward to a boost-related book written by Chinese people, when I see the contents of this book, I can't help but despise it: there are too many things, like a flow account, it may even directly copy official documents.

When I got my book, I found that it exceeded my expectation. The author was so bitter that at least plagiarism did not exist. Chapter 0th and chapter 1 introduce readers to the new world of boost, describe the basic structure and reading guide of this book, then install and compile boost, and provide a ladder to the beginning. This book can be said to be slightly detailed. As a book positioned as a manual + introduction, it is not easy to do so. The orchestration is simple to understand, while the curve is smooth. For example, the "time and date" is used as an example of Hello boost, which is different from the boost on the market (usually started with shared_ptr ), because "time and date" is a concept that everyone is familiar with every day, it is much easier to accept. It makes people feel that boost is really useful and solves practical problems. In this way, the reader's interest in boost is checked, it's no longer difficult to read it. In fact, according to my ideas, I think it should be better to talk about strings and various containers, such as tuple, unordered, bimap, and circular_buffer; unfortunately, this book will start to talk about memory management immediately and introduce shared_ptr.

Another characteristic of this book is that the examples are constructed by the author and show the author's intention to make a good book. For example, let's talk about the Chapter of the date_time database and construct a credit card interest-free period computing example. For example, when I was around, I felt fresh. I read this example and thought that the author was really an exclusive developer. Even so, it should be noted that the author may not like to refer to some examples of others (for fear of being plagiarized and deliberately avoiding suspicion ?), There are also some examples that I think are not very good. For example, when talking about operators, the class point actually supports the size comparison and addition and subtraction operations. The concept of the number of operations is not clear. If you really want to use this example, I think it may be better to call it class vector3d (3D vector.

Finally, let's talk about what I don't like most about this book. In my opinion, since readers have already started to learn and use boost, it must have a good foundation and strong self-learning ability. The boost guide is still positioned at the level of introduction and manual, in my opinion, this book is too long to be written deeply. Although the book is based on the author's own experience and learning achievements, the example is also well-developed, but reading it will not feel better than the official documentation. About the boost book, I am looking forward to perhaps how to solve some classic problems with boost and show the powerful and practical boost cookbook to readers. From the perspective of the book, the author's c ++ experience is quite rich. This book does not show the actual level of the author at all. I hope that the author will be able to add fuel and exchange ideas to bring us a boost cookbook.

In the last two chapters, boost, design patterns, and concluding remarks are the final touch. The former combines 23 gof design patterns with the three later summarized design patterns with boost, and breaks through which libraries in boost use the design patterns, it can be said that it breaks the puzzle of exquisite and flexible boost libraries, and also gives learners and fans of design patterns a model of application and implementation. This is not seen in other books. In conclusion, the author bluntly said that C ++ and boost still have many shortcomings, but we do not have to stick to this. We need to broaden our horizons and use good tools to solve problems and programming, kung fu is outside poetry. The author finally said one sentence, because I have also said similar things that make me feel miserable, so I borrowed it to end my Book Review :...... Not only C ++, code, and programming are in our lives, but there are more things worth learning about. Friends, loved ones, and loved ones are even more worth spending time with them. Go out of the office, leave the computer, get close to nature, Enjoy meals, take a walk, play a ball ...... With a wonderful life, we can create a perfect program.

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.