[Bro-Dev] Hooks (Re: [Bro-Commits] [git/bro] topic/jsiwek/hook: Add new function flavor called a "hook". (e0fb9eb))

Robin Sommer robin at icir.org
Tue Nov 20 08:51:33 PST 2012

On Tue, Nov 20, 2012 at 16:33 +0000, you wrote:

> But I do think if it had a return value, then it shouldn't mix in
> "break" to allow implicitly returning values, but require "return"
> like normal.

Hmmm, good thought. Can we even get the best of both worlds by making
it all implicit: the hook definition doesn't define any return value,
but executing the hook still returns a boolean indicating whether one 
of the hook implementations short-circuuted with a "break" or not.

And, maybe, we could use a different syntax instead of "break"; like
"stop" or "hook stop", to make it more explicit what happens (not that
I like either particularlly).

> If you want, you can hold off on merge until this is decided, it's
> probably not just a trivial change to do (but not likely too difficult
> either).

Either way is fine for me, we can tweak further after the merge. I
would have merged it already but didn't get to it yet (and the rest of
the week doesn't look much better right now unfortunately). If
somebody depends on this for moving forward, please work from the
branch in the meantime.


Robin Sommer * Phone +1 (510) 722-6541 * robin at icir.org
ICSI/LBNL    * Fax   +1 (510) 666-2956 *   www.icir.org

More information about the bro-dev mailing list