Open awelzel opened 1 year ago
I think it is currently impossible to use parentheses to group such attributes to make intended semantics clearer. Maybe that would be a first step towards making this easier to control.
I've moved this to zeek-docs, as documenting might be the most sensible action for now.
Talking with @bbannier a bit around, copy(), attributes, and gotchas. The following is a valid script today:
And it probably doesn't do what was intended:
Putting
&ordered
as part of (or just behind)&default
does likely what was intended:We may consider this just a variation of the existing gotchas around attributes and how they bind to values rather than vars/fields. And possibly default initialization for containers isn't prevalent enough (though minimally Files::Info has analyzers with
&default=string_set()
- possibly historically), but maybe warning/erring on such constructs would not a bad idea.