After the fashion of my previous attempts at language extension (see signature), where we try to bring features that don't exist in BlitzMax into availability, I present:
Aspect-oriented programming for BlitzMax
Featuring: -- pointcuts -- advice (before/after/instead) -- soft name matching -- extension methods -- examples
Aspect weaving happens at runtime. Method advisement is implemented by generating new class definitions and linking the advice code back to the original with runtime-generated stub code.
The extension methods feature is particularly fun. It works with my Interface mod, so you can even get syntactic support for your added methods instead of needing to use reflection!
Aspect-orientation can be hard to grasp, but it's really cool once you do. Try it, it's fun.
|