Ah. OK, I get you now - initial sourcing picks up function definitions (but not execution thereof) at that time.
However, this feels overly complex. I’m not saying unnecessarily so, I wouldn’t know - the more I look the more I realize how many larger concerns are in play (e.g. qubes vs whonix, poking at the packages you noted, debian + lintian), the more expensive it appears gazing into the contributing room from the doorway. And the less inclined I am to cross that threshold. (No doubt, after several years of contributing, looking back on that comment will feel very newbie and wasn’t really something all that intimidating. Not so much so, today, though.)
Here, in this complexity, not doing as you suggest feels like it brings: prove {this} out {fini}, next then prove {that} out {fini}. vs the complexity, inserting many little bits in many places, and having to prove the whole out every time. i.e. Every time one turns around there’s another new entire ecosystem to grok before one can begin to think about where they’re trying to go. (I’m not saying this isn’t inherent / inevitable, merely daunting.)
Hmmm. This doesn’t handle the case of multiple addons. Unless it is the responsibility of each function declarer to chain to the next. Or leads to what essentially become callbacks.
Arrays, instead?
func mypostcallstuff() {
mystuff;
}
hook_end_funcs += mypostcallstuff();
foreach hook_end_funcs call hook_end_funcs(@);
[Pardon the really bad pseudo-code.]
- problem, something developed later wants to insert itself earlier in the chain, the running of which breaks something developed earlier but now called later. (Perhaps this is an inevitable Catch 22.)
Is there a separate forum / wiki / phabircator (?) area where this discussion should be moved to / is already ongoing?
In the mean time, see next messages, trying to keep discussion points / threads here separate.