The interesting thing about method Pointers is that their use can be an indication that the code violates the LawofDemeter.
关于方法指针,有意思的事情是:它们的使用可能就表明代码违反了迪米特法则。
2
In Listing 9, you can see how this code demonstrates the LawofDemeter — and how it could be used to wreak havoc with people's wallets!
在清单9中,可以看到这些代码演示了迪米特法则——如何用它洗劫人们的钱包!
3
Lastly, the closure structure more closely follows the LawofDemeter since your object would, theoretically, be "reaching through" via the prototype chain.