2006/5/18, Khalid B <kb@2bits.com>:
On 5/18/06, Richard Morse <remorse@partners.org> wrote:
On May 17, 2006, at 7:20 PM, Jeremy Epstein wrote:
I have another suggestion - and this time it's a serious one. How about changing it so that we literally put the word 'hook' into all hook implementations?
So whereas now we have: function user_menu()
Instead we would have function user_hook_menu()
I like this idea. Extent code should be able to be fixed programatically (we have a finite list of hooks), and this method is self-documenting; it makes it clear which functions are hooks and which aren't.
I also +1 this idea which is better than mine (disallow underscore in module names).
+1 from me as well. Reasons already stated above.
They are different solution though, one requires no work at all, and imposing the restriction in cvslog/project modules.
The other requires changes to Drupal core as well as contrib (perhaps scripted ...)
Depends on how severe we think this problem is, and whether it warrants change now ...
One could always make the change now to Drupal's code but still support hook functions without 'hook' - possibly disallow them from 4.8 and onwards? (Ie., allow both the way it is now and hook_hook in DRUPAL-4-7, and only hook_hook in HEAD - allowing people to migrate easily without having to change too much to remain compatible between 4.7 and 4.8 (I don't know what the policy is on this generally, so maybe it should only go in HEAD...).) But then, I've only just stumbled upon the discussion save a few tidbits I've picked up in #drupal - the above just makes sense to my sleep deprived head as of this moment. :) -- Frederik 'Freso' S. Olesen <http://freso.dk/>