Re: [翻译] Java Collection API 的怪事

楼主: AmosYang (泛用人型编码器)   2013-03-22 07:38:15
※ 引述《PsMonkey (痞子军团团长)》之铭言:
: ※ 引述《PsMonkey (痞子军团团长)》之铭言:
: : [JavaDoc 中有一个非常奇怪的事情][quirk in JavaDoc]:
: : 回传的 collection 并没有原本 collection 的 `hashCode()` 跟 `equals()`,
: : 而是使用 `Object` 的 method。
: 这句的原文是:
: The returned collection does not pass the
: hashCode and equals operations through to the backing collection,
: but relies on Object’s equals and hashCode methods
: 我对那个 pass XXX throught to OOO 完全不知道怎么翻译
: 只好用实际意义乱翻 [死]
被传回的 immutable collection 不会把 hashCode 及 equals 的运算交给
原本的 (mutable) collection 处理,而会把那些运算交给 Object
这个 class 的 hashCode 及 equals 去处理
: : 当原本的 collection 是 set 或 list 时,
: : 就需要 preserve the contract of these operation(译注:翻译不能 Orz)。
: preserve the contract of operations 也卡住
: 理论上 preserve the contract 应该不是什么专有名词
: 但是用字面上翻译也很... 别扭 Orz
: 还请高手开示...... Orz
只有这样做才能满足像 set 或 list 这类 collection 的 hashCode, equals
运算方式的规范
我赞成保留特殊术语的原文,但不看好逐句切割后照字面的翻法
保留原文术语可以当日后拜神时的索引关键字,但在翻译“观念”时
我倾向于释义多于字面上的忠实翻译,然后再加注
“此处原文为 ... preserve the contract ... 为了译文通顺,
在此将 preserve 解释为满足”
甚至可在释义文里补上原文里被省略的字词以求通顺清楚
这是目前机器翻译还做不到的,也是手动翻译的优势

Links booklink

Contact Us: admin [ a t ] ucptt.com