现在的位置: 首页 > 综合 > 正文

“Thinking in C++”(第2版)第1卷三种文本对照学习注记

2014年06月14日 ⁄ 综合 ⁄ 共 2985字 ⁄ 字号 评论关闭

1.        引言

本文汇总了对英文原著“Thinking in C++”及其法文译本和中文译本进行对照学习时所做的注记。这三种文本是:

 

英文版:Bruce Eckel: Thinking in C++ (Second Edition), Volume One: Introduction to Standard C++, http://bruce-eckel.developpez.com/livres/cpp/ticpp/v1/

 

法文版:Pencer en C++, Date de publication : 27/08/2008 , Date de mise à jour : 27/08/2008, http://bruce-eckel.developpez.com/livres/cpp/traduction/ticpp2vol1/

 

中文版:刘宗田 袁兆山 潘秋菱 等,C++编程思想(第2版) 1卷:标准C++导引,机械工业出版社,2002.9 20093月第1版第17次印刷

 

通过对照学习,笔者感到总体来说中文版对我们初学者是有用的,能帮助我们基本理解原著的要义。但如果要精读,就不能只读中文版了

2.        注记

1

章节

0 - Preface

英文版

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.

法文版

Du début à la fin, j'adopterai l'attitude selon laquelle vous voulez construire un modèle dans votre tête qui vous permettra de comprendre le langage jusque dans ses moindres details.

中文版

我将始终坚持一种观点:读者应当在头脑中建立一个模型,以便逐步理解这种语言,直到炉火纯青的程度

注记

没有查到把“bare metal”译为“炉火纯青的程度”的依据。法译文是“较小的细节”。

 

2

章节

1.1 - The progress of abstraction

英文版

The idea is that the program is allowed to adapt itself to the lingo of the problem by adding new types of objects.

法文版

L'idée est qu'on permet au programme de s'adapter au fond du problème en ajoutant de nouveaux types d'objets.

中文版

其思想是允许程序通过添加新的对象类型,而使程序本身能够根据问题的术语进行调整。

注记

法文版把“the lingo of the problem”翻译为“问题的实质”。

 

3

章节

1.1 - The progress of abstraction

英文版

This is actually a loaded statement.

法文版

C'est une caractéristique lourde de signification.

中文版

这实际上是一条装载语句。

注记

此句拟理解为“这实际上是一种意味深长的说法”,或按法文版“这种特性具有丰富的含义”。

 

4

章节

1.3 - The hidden implementation

英文版

In any relationship it’s important to have boundaries that are respected by all parties involved.

法文版

dans chaque relation il est important de fixer des frontières respectées par toutes les parties concernées.

中文版

在任何关系中,存在一个所有的参与者都遵从的边界是重要的。

注记

法文版使用了动词fixer,即“确定边界,有主动意义。

 

5

章节

1.4 - Reusing the implementation

英文版

Composition comes with a great deal of flexibility. The member objects of your new class are usually private, making them inaccessible to the client programmers who are using the class.

法文版

La composition s'accompagne d'une grande flexibilité : les objets membres de la nouvelle classe sont généralement privés, ce qui les rend inaccessibles aux programmeurs clients de la classe.

中文版

组合具有很大的灵活性,新类的成员对象通常是私有的,使用这个类的客户程序员不能接触它们。

注记

英文版和法文版都说“组合带来很大的灵活性”。Inaccessible是不能访问。

 

6

章节

1.5 - Inheritance:reusing the interface

英文版

By itself, the idea of an object is a convenient tool. It allows you to package data and functionality together by concept

法文版

L'idée d'objet en elle-même est un outil efficace. Elle permet de fournir des données et des fonctionnalités liées entre elles par concept

中文版

对象的思想本身是一种很方便的工具。我们可以将数据和功能通过概念封装在一起

注记

“我们可以”拟改为“它允许我们”。

 

7

章节

1.5 - Inheritance:reusing the interface

英文版

This is effectively what you get with inheritance, with the exception that if the original class (called the base or super or parent class) is changed, the modified “clone” (called the derived or inherited or sub or child class) also reflects those changes.

法文版

C'est ce que l' héritagepermet de faire, avec la restriction suivante : si la classe originale (aussi appelée classe de base, superclasseou classe parent) est changée, le « clone » modifié (appelé classe dérivée, héritée, enfantou sous-classe) répercutera aussi ces changements.

中文版

这就是继承(inheritance)带来的好处,缺点是,。。。。。

注记

英文exception是例外,法文restriction是局限,都没有说是缺点。

抱歉!评论已关闭.