开始翻译第18章之前,我以为这一章应该是比较简单的,因为这一章的内容我比较熟悉,大部分都是GOF那本书里面讲过的。但是开始翻译才觉得非常的困难,主要是作者的语言风格和用词特别的不舒服。不知道是自己水平不行还是作者用词太诡异。
Since the reusing existing code should ideally be a means to an end and not an end in itself, reused code should offer an interface that allows clients to use it in new contexts on their own terms.
类似的句子,作者信手拈来,我却是搜肠刮肚猜不出。你来帮我猜猜吧。这是讲Object Adaptor的。
a means to an end -- 达到目的的手段
an end in itself -- 目标本身
因为重用已有的代码是手段而非目的,所以重用的代码应该提供良好的接口,以便客户端可以按照自己的需要在新的环境下使用之。