The interesting thing about method Pointers is that their use can be an indication that the code violates the Law of Demeter.
关于方法指针,有意思的事情是:它们的使用可能就表明代码违反了迪米特法则。
Delegates are special types that encapsulate a method, similar to function Pointers found in other programming languages.
委托是封装方法的特殊类型,它类似于其它编程语言中的函数指针。
Method handles act as both function Pointers and as function combinators, allowing a built-in way to construct a call protocol flow from a caller to a callee.
方法句柄可以同时作为函数的pointer和combinator,允许用内置的方式建立一个从调用器到被调用者的调用协议。
应用推荐