I've noticed that it's common (at least in ECMAScript) to suffix event handlers with 'handler': clickHandler
, fooBarHandler
, etc… But I've always thought it made more sense to prefix them with 'handle': handleClick
, handleFooBar
, etc.
With prefix notation, methods are much easier to visually parse (it's very easy to distinguish between handlers and other things), faster to find (or ignore) with the editor's text completion and they adhere to the convention that methods should be verbs (handleClick
is a verb, clickHandler
is a noun).
So, why is the suffix notation common? Is there some hidden benefit that I haven't noticed?