这个定理的意思很容易理解,新增需求所需的最优接口集合的子集如果在已有实现中存在时,那么可以直接复用它,否则需要写新代码来实现新的接口,总之原有代码可以不做修改。接口重构定理指出了一种符合Open-Close原则的重构方式。 按照接口重构定理来进行重构,如果原有实现不是按照最优接口集合子集来进行设计,那么同一模块内...
The real reason single-level store is not ubiquitous is probably a concern for efficiency. The usual file-system interface encourages a particular style of access: Open a file, go through it sequentially, copying big chunks of it to or from main memory, and then close it. While it is poss...