zeek/scripts/base/utils
Benjamin Bannier d5fd29edcd Prefer explicit construction to coercion in record initialization
While we support initializing records via coercion from an expression
list, e.g.,

    local x: X = [$x1=1, $x2=2];

this can sometimes obscure the code to readers, e.g., when assigning to
value declared and typed elsewhere. The language runtime has a similar
overhead since instead of just constructing a known type it needs to
check at runtime that the coercion from the expression list is valid;
this can be slower than just writing the readible code in the first
place, see #4559.

With this patch we use explicit construction, e.g.,

    local x = X($x1=1, $x2=2);
2025-07-11 16:28:37 -07:00
..
active-http.zeek Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
addrs.zeek
backtrace.zeek
conn-ids.zeek flag base script as being known to ZAM optimization 2024-04-25 09:15:13 -07:00
dir.zeek Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
directions-and-hosts.zeek
email.zeek
exec.zeek Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
files.zeek
geoip-distance.zeek
hash_hrw.zeek
numbers.zeek Fix errors from rst linting on the generated docs 2025-01-24 11:41:36 -07:00
packages.zeek utils: Introduce packages.zeek with can_load() helper 2024-02-22 11:41:50 +01:00
paths.zeek
patterns.zeek Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
queue.zeek
site.zeek Add recommended non-routable subnets 2025-01-09 22:15:45 -07:00
strings.zeek
thresholds.zeek
time.zeek Introduce get_packet_lag() 2024-12-09 19:19:29 +01:00
urls.zeek