Closed doy closed 11 years ago
Maybe it'd make more sense for before:FINALIZE
to run after applying roles? I'm not sure.
Yes, that's almost certainly the right answer. It really doesn't make a lot of sense to have a hook point where the mop isn't internally consistent. The hook points should be before and after the mop aspects have been flattened into the stash. Maybe the events shouldn't be named FINALIZE
, but should be tied into the compiler part (from #112)?
Currently, there is no way to modify methods in a class during
FINALIZE
. If you attach an event tobefore:FINALIZE
, you miss being able to see any methods that were applied from roles, and if you attach an event toafter:FINALIZE
, the method has already been written into the stash (and in the future, we'd like to be able to write an optimized version into the stash that bypassesexecute
, if possible). How should we organize the events such that this is possible?