[development] Eliminate hooks entirely in Drupal 6
karoly at negyesi.net
Wed Jan 24 01:05:32 UTC 2007
A big -1 on eliminating the hook concept.
A big +1 on registering and adding file concept.
The way I see the future of hooks:
a) hook_define_hooks, herein you can define hooks.
b) on module enable time, Drupal scans your module for hooks and registers them for you -- this would merely be a cached version of module_implements. But, if you want, you can register for yourself. You could define whether you want to come before or after other module's implementation (see weights.php in my sandbox for an implementation of this -- THAT is prior art :) ) and now with Merlin's idea you could define files as well. Yes, files, it needs to be an array for what I believe, obvious reasons.
This way if you do not want to bother with registering then you do not need to. If you want to then it benefits you.
Split mode is woe because of references and because everything becomes call_user_func_array called -- cufa is not fast enough. Also, too many files need to be included. Let's task the humans with grouping their functions together into chunks.
More information about the development