zeek/scripts/base/protocols
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
..
conn Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
dce-rpc Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
dhcp Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
dnp3 Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
dns Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
finger Add BIF have_spicy_analyzers(). 2023-02-03 13:47:26 +01:00
ftp Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
http Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
imap Merge remote-tracking branch 'origin/topic/seth/zeek_init' 2019-04-19 11:24:29 -07:00
irc Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
krb Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
ldap Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
modbus Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
mqtt Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
mysql Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
ntlm Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
ntp Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
pop3 Add STLS command to POP3 DPD signature 2025-05-14 16:37:25 +02:00
postgresql Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
quic Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
radius Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
rdp Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
redis Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
rfb Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
sip Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
smb Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
smtp Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
snmp Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
socks Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
ssh Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
ssl Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
syslog Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
tunnels Add Teredo packet analyzer, disable old analyzer 2021-11-23 19:36:50 -07:00
websocket Prefer explicit construction to coercion in record initialization 2025-07-11 16:28:37 -07:00
xmpp Merge remote-tracking branch 'origin/topic/seth/zeek_init' 2019-04-19 11:24:29 -07:00