但是作为对面向方面编程的一种认可,这个例子让我们可以分离那些在不同层次上运作的关注事项。
But in what might be described as a nod to aspect-oriented programming, this example lets us separate concerns that operate at different levels.
高阶函数提供比面向对象概念更高层次的抽象。
Higher-order functions offer a higher level of abstraction than object-oriented concepts.
而我所考虑的面向接口编程方式是这样的,当我编写客户端代码时,我会针对接口尽量调用抽象的类也就是层次顶端的类型,但同时要基本包括所需的内容。
The way I think about programming to interfaces is that, as I write client code, I want to write against the interface of the type that's as far up that hierarchy as I can go, without going too far.
应用推荐