组件与对象用形式方法 Formal Methods for Components
如果接受或返回M对象的任何方法隐式地假设M的所有权被转移,那么您必须也文档说明这一点。
If any methods that accept or return an m object are implicitly assuming that the ownership of m is being transferred, you must document that, too.
通过安排不同类型的对象来执行公共方法,我们将分派决定移到对象中并从显式条件块中消除。
By arranging for objects of different types to implement common methods, we move the dispatch decision into the objects and out of an explicit conditional block.
在本系列的第2部分中,您将首先学习分布式对象方法,它与远程过程调用方法的关系更密切。
In Part 2 of this series, you'll first learn about the distributed objects approach, as it's more closely aligned with RPC.
应用推荐