in reply to Motivation for replacing object methods at runtime
I think a better motivation for being able to replace subroutines dynamically is AOP. When you can manipulate the dispatch tables like this, some flavours of AOP become trivially easy to implement, simply insert an appropriate function and you're done (this works for any advice that only needs access to the subroutine's parameters).
Other kinds of AOP are a bit more difficult to implement, but as long as you want to apply advice on subroutines, you don't need to proxy objects (like it's often done in Java).
|
|---|