[Bro-Dev] Closures in Bro

Jan Grashöfer jan.grashoefer at gmail.com
Wed Dec 20 02:07:13 PST 2017

On 19/12/17 18:31, Jon Siwek wrote:> I think it's mostly unsupported due 
to trickiness of implementation
> (or cowardice) rather than by design decision.  Or at least something
> scared me off when I looked into it a few years ago [1].  Don't
> remember the details, though I likely didn't give it more than a day
> or two of thought/effort, so maybe don't let that deter you if you had
> plans to look into it.

Indeed, it seems tricky to get that working! I am not sure I will be 
able to find the time to look deeper into this. At a first glance, I 
would try to wrap function IDs into a new Val type that is able to carry 
the context. The particular context would be determined, when evaluating 
the expression, which returns the anonymous function. In the end, when 
the function is called, the context values could be treated as 
additional arguments.


More information about the bro-dev mailing list