[development] The new menu system

Jeff Eaton jeff at viapositiva.net
Tue Sep 26 15:36:47 UTC 2006

Moshe Weitzman wrote:
> sure, thats a reasonable option ... i find it useful though to 
> distinguish between hooks that care about your return value and hooks 
> that don't. those that don't are candidates for grouping within a single 
> hook_signal($op). the principle advantage is cutting down on the number 
> of hooks ... not a big deal though.

If there's one thing I've become convinced of after working with 
NodeAPI, it's that multi-operation hooks are evil. In some cases it 
makes sense -- providing an $op is a way to distinguish between what 
triggered a given call to the function. But in many cases, we use and 
abuse $op to squish many disparate functions into a monster-function.

Separate hooks with clear meanings is a happy thing, IMO at least.


More information about the development mailing list