[Bro-Dev] changing Notice::policy mechanism
Robin Sommer
robin at icir.org
Wed Nov 7 21:27:12 PST 2012
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 * robin at icir.org
ICSI/LBNL * Fax +1 (510) 666-2956 * www.icir.org
More information about the bro-dev
mailing list