[Bro-Dev] "delete" for record field proposal

Seth Hall seth at icir.org
Tue Apr 19 13:02:17 PDT 2011

I wanted to propose an additional use for an existing syntax.  It would be helpful to be able to delete the value from record fields using the "delete" keyword.  Here's an example:

type Whatever: record {
	field1:   string &optional;

local foobar: Whatever;
print foobar;
  ===> [$field1 = <undefined>]

foobar$field1 = "test";
print foobar;
  ===> [$field1 = "test"]

delete foobar$field1;
print foobar;
  ===> [$field1 = <undefined>]

Thoughts?  Does reusing that existing keyword in this situation make sense?


Seth Hall
International Computer Science Institute
(Bro) because everyone has a network

More information about the bro-dev mailing list