编者按——
首先祝大家新年快乐,万事如意!最近这段时间,大家在技术英语论坛讨论到一些专业词汇。其实我们在学习和工作过程中会不断碰到一些新的词汇,如果影响理解就需要认真对待了,以免一错再错,影响其它。希望大家继续将遇到的新词、难句积极主动地提出,以使大家认真讨论正确理解。
..............................................................................
主题:MSDN中讲RTTI 被增加到C++中的原因,我看不太明白,请帮忙翻译一下!多谢!
作者:pyhmail ( 书生 )
回复次数: 3
发表时间: 2004-11-23 9:10:26
原文:RTTI was added to the C++ language because many vendors of class libraries were implementing this functionality themselves.
译文:加入RTTI机制到C++语言是因为很多类库制作商要自己实现这些类库的功能。
辨析:RTTI就是run-time type information(运行时类信息)。这是一种很不错的机制,它允许在运行期内确定对象的类型(而平时的C++是在编译时确定变量或对象类型的)。说到MSDN的支持文档,很多开发人员在学习和工作中都会充分对其加以运用,即便对于VC++来说英文文档偏多。下面是关于RTTI的MSDN上的介绍原文:
Run-time type information (RTTI) is a mechanism that allows the type of an object to be determined during program execution. RTTI was added to the C++ language because many vendors of class libraries were implementing this functionality themselves. This caused incompatibilities between libraries. Thus, it became obvious that support for run-time type information was needed at the language level.
For the sake of clarity, this discussion of RTTI is almost completely restricted to pointers. However, the concepts discussed also apply to references.
..............................................................................
主题:argument在c++中是什么意思啊
作者:jadeandvigan ( 书童 )
回复次数: 4
发表时间: 2004-11-18 22:56:06
原文:formal parameter;actual argument.
译文:形参;实参
辨析:网友zyq654321说:一般而言,定义函数时,其参数为parameter;使用函数时,传入的参数称为argument。在读编程书籍时(尤其是C++等语言),我们常常会碰到这两个词,个人认为如果按zyq654321所说的理解一般是不会出错的。
.............................................................................
主题:Translate it in Chinese !
作者:zhaotide (书童)
回复次数: 3
发表时间: 2004-12-3 11:59:03
原文:Inheritance is often overused, even by experienced developers. A sound rule of software engineering is to minimize coupling: If a relationship can be expressed in more than one way, use the weakest relationship that's practical.
Given that inheritance is nearly the strongest relationship we can express in C++, second only to friendship, it's only really appropriate when there is no equivalent weaker alternative. If you can express a class relationship using composition alone, you should prefer that.
译文:继承常常被过度使用,即使是富有经验的开发人员也不例外。在软件工程中,一个合理而可靠的规则是尽量让(设计中对象的)耦合关系降至最低。如果(对象间的)关联可以有多种表示形式,实用的方法是采用其中关联最弱的一个。
如果说继承几乎是我们在C++中可以表示的最牢固的关联,那么紧跟其后的就是友元。当不存在相同意义上更弱的关联时,友元在此时是合适的。如果可以单独使用组合就能表示类的关联,那就最好用它。
辨析:zyq654321给出译文的同时,对原文“composition”一词的理解也发表了其个人的看法:“composition个人理解不是一个词,简单来说可以把它考虑为一种关系,比如组合,但是这么译依然会很抽象。根据上下文中提到的关系如继承,友元等,它实际是指现实世界中关联非常小或者说非常“松散”的关联。”我非常同意他的这个看法,同时根据上下文我想这个词理解成这样是否会更好一些:composition这里是指现实世界中关联较小或者说较“松散”的关联。其实了解一个词到这种程度,我想你不会再对原文有什么不理解的地方了吧。这段原文是从国外某著名开发站点上摘录的,也是一个开发人员的经验总结,值得我们认真体会学习!
..............................................................................
|