concept dynamic programming in category groovy

appears as: dynamic programming, Dynamic programming
Groovy in Action, Second Edition

This is an excerpt from Manning's book Groovy in Action, Second Edition.

3 The main character sees a child playing with a dynamic spoon object and realizes that it isn’t a truly physical object. Dynamic programming is kind of like that.

The MOP needs a lot of information to find the right call target for each method call that it serves. This information is stored in so-called metaclasses. These metaclasses aren’t fixed. One part of dynamic programming is changing the content of metaclasses and replacing one metaclass with another. We’ll explore this in section 8.4.

Dynamic programming breaks this limitation by allowing the introduction of a new state, or even more importantly, allowing the addition of a new behavior or modification of an existing one.