Preface to the Chinese Edition

This is a book about programming in C++.In praticular,it is first a book about programming and then a book about C++.In that sense,it is very different from most kooks about C++,which concentrate on what the language is rather than on how to use it.

  Is the best author the one who knows the most words?Is the best musician the one who cna play the most notes?Is the best painting the one with most brush strokes?Of course not--these very ideas are absurd.Yet too often,we think that the best programmers are the one who know the most language features.This idea is equally absurd:The hard part of programming is not learning the details of language features--it is understanding how to solve problems.

  This book doesn't talk much about language features.Instead,its talks about programming techniques.Just as a writer must learn how to tell a story,a programmer must learn how to analyze a problem.Accordingly,this book is full of problems and their solutions.Studying them is one way to become a better programmer.

  Most of the solutions in this book share the idea of abstraction--concentrating one's attenton on just the parts of a problem that are important in teh current context.It is impossible to write computer programs without using abstraction in one way or anohter,a fact that makes abstraction the most important single idea in programming.C++ supports abstraction in several forms,the best kn own of which are abstract data types,object-oriented programming,and generic programming.

   Generic programming was not a widely known idea when we published this book.The idea became popular only a few years later,when the STL(Standard Template Library),a library designed to support generic programming,became part of the c++ standard library.As a result,the ideas in this book have become more important with time.

   We hope that you can use these ideas to understant the fifference between a pile of code and an abstaction--a difference that is as important as the difference between a pile of words and a story,or a pile of notes and as song,or a pile of brush strokes and a painting.

posted @ 2013-04-19 12:37  liyunyu1  阅读(192)  评论(0编辑  收藏  举报