Here's another variant. Don't know yet if I like it but we could make
use of type overloading for finding the right cases:
with (n: Notice::Info)
{
if ( xxx )
break; # short circuit
}
with (n: Notice::Info)
{
if ( yyy )
do_someting();
}
[...]
local n: Notice::Info;
switch on n;
[...]
"switch on" runs all "with"s that have a matching argument type.
Predicated need to be written explictly as if() stmts.
There might be nicer syntax than "with" and "switch on".
Robin
--
Robin Sommer * Phone +1 (510) 722-6541 * [email protected]
ICSI/LBNL * Fax +1 (510) 666-2956 * www.icir.org
_______________________________________________
bro-dev mailing list
[email protected]
http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-dev