Open jaidetree opened 2 years ago
Trying to avoid reading all the code right now, but iirc the way we do it is we define the function as advisable, and it keeps a meta table that remembers if its advised, and if so, knows to invoke the advised functions when and where.
I like his suggestion, it's certainly simpler. Only thing I can think of as a trade-off is that if a handle to the function directly were held anywhere, then advising the function wouldn't 'apply' there.
There was a fennel online meetup, and I gave an impromptu overview of spacehammer and hammerspoon and went over the advising system.
Technomancy suggested another approach: Apply the advice at a module level to replace the target functions. This means defadvice would take an extra arg for module location but it could update the module registry at runtime and it would not need any
make-advisable
ordefn
macros.