Context
The 2026-05-06 audit shows 4 home-os kernel modules failing with `error: Logical not requires boolean or optional operand` on patterns like:
if (!some_u32_value) { ... } // C-style "is zero" test
if (!some_pointer) { ... } // C-style "is null" testDesign question
Two options:
- Accept C-style truthiness: `!` on int → `x == 0`; `!` on pointer → `x == null` (or analogous). Low-effort parser patch, matches what kernel writers naturally wrote.
- Reject and codemod kernel: keep current strict typing, rewrite kernel to `x == 0` / `x == null`. ~4 sites.
Option 1 is more ergonomic but introduces an implicit coercion that contradicts Home's "explicit init" / Zig-philosophy direction. Option 2 is more consistent.
Recommended: Option 2 (kernel codemod) — small enough to be trivial, keeps the language's explicit-typing posture.
If you pick Option 2, file as a home-os kernel codemod issue and close this on the compiler side.
Affected files
Filter audit for `Logical not requires`. ~4 files.
Reference
- 2026-05-06 audit