第一次看到题为《C++编程思想》的中译本,我以为这本书讲的是C++中的编程思想。再一看,原来英文版原著的名称是“Thinking in C++”。难道译者把thinking看成名词并解释为编程思想,把in解释为在…之中?
原著在序言中的以下一段文字的最后点出了书名:
Throughout, I’ll be taking the attitude that you want to build a model in your head that allows you to understand the language all the way down to the bare metal; if you encounter a puzzle, you’ll be able to feed it to your model and deduce the answer. I will try to convey to you the insights that have rearranged my brain to make me start “thinking in C++.”
中译本把这段文字中的“thinking in C++”准确地翻译为“用C++进行思考”。
序言中还有一段值得注意的文字:
You can’t just look at C++ as a collection of features; some of the features make no sense in isolation. You can only use the sum of the parts if you are thinking about design, not simply coding.
由此看来, “thinking in C++”应理解为用C++进行思考,thinking的主体是人,而不是C++。
以前关于程序设计语言的书经常用《Programming in …》作为书名,现在该书作者用了thinking一词,我想是为了强调要学习用C++来思考设计,而不是仅仅用于编写代码。这与学习英语要达到“thinking in English”那样的境界的说法是相通的。
该书的法文译本的书名是“Penser en C++”,这与英文书名完全对应,没有歧义。