翻译错误真是随处即拾
2014-06-23
整体上还是可以看的,不过很多地方看不懂只是因为翻译不恰当。
这本书本身值五颗星。
译文:
一个对象是否需要是线程安全的,取决于它是否被多个线程访问。这指的是程序中访问对象的方式,而不是对象要实现的功能。
原文:
Whether an object needs to be thread‐safe depends on whether it will be accessed from multiple threads. This is a property of how the object is used in a program, not what it does.
修正:
一个对象是否需要是线程安全的,取决于它是否被多个线程访问。这只和对象在程序中是以何种方式被使用的有关,和对象本身具体是做什么的无关。
译文:
有时候,面向对象中的抽象和封装会降低程序的性能(尽管很少有开发人员相信),但在编写并发应用程序时,一种正确的编程方法就是:首先使代码正确运行,然后再提高代码的速度。
原文:
Sometimes abstraction and encapsulation are at odds with performance ‐ although not nearly as often as many developers believe ‐ but it is always a good practice first to make your code right, and then make it fast.
修正:
(尽管远远不如很多开发者所认为的那样频繁)
译文:
然而,程序状态的封装性越好,就越容易实现程序的线程安全性,并且代码的维护人员也越容易保持这种方式。
原文:
but the better encapsulated your program state, the easier it is to make your program thread‐safe and to help maintainers keep it that way.
修正:
然而,程序的状态封装得越好,程序的线程安全性就越容易实现,同时代码的维护人员也更容易维持程序的这种状态。