Aspect-oriented programming

BlitzMax Forums/BlitzMax Programming/Aspect-oriented programming

Yasha(Posted 2015) [#1]
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.


markcw(Posted 2015) [#2]
.


markcw(Posted 2015) [#3]
.


dmaz(Posted 2015) [#4]
Very Nice!


Xerra(Posted 2015) [#5]
Why does Munch keep leaving full stops in threads? Perhaps he thinks we are playing Pacman and these are power-up pills?


H&K(Posted 2015) [#6]
Microdots.