What is Intercession?
Intercession is the ability for a program to modify its own execution state or alter its own interpretation or meaning. This is especially useful for performing logging, profiling and debugging tasks.
As with introspection, this works by reifying metaobjects of the runtime. However, instead of merely querying these reified metaobjects, we alter tham and reflect them back to the meta-level, thus changing the behavior of the running system
We will explore several forms and styles of intercession, starting with some o f the built-in features of Smalltalk and Pharo, and progressing to some more advanced libraries and frameworks.
Compiling and performing code — shows several ways to programmatically create classes or methods, or evaluate code
Understanding object pointers — shows how we can walk through memory, and even swap pointers systematically to point to other objects
Overriding doesNotUnderstand: — shows how #doesNotUnderstad:
can be overridden to perform useful tasks, such as logging or generating code
Anonymous classes — shows how anonymous classes can be used to selectively change the behavior of specific objects
Method wrappers — shows how to adapt method behavior using wrapper objects that implement #run:with:do:
Reflectivity —