logoalt Hacker News

kossisoroyceyesterday at 9:26 AM1 replyview on HN

Fair point in general, but the risk profile here is actually quite low. The generated C is purely computational, with no heap allocation, no pointer arithmetic, no user-controlled memory, no IO. It's essentially a deeply nested if/else tree over a fixed-size float array. The "unsafe" surface in C is largely a non-issue when the code is statically shaped at compile time from a deterministic compiler pass.

Rust/Zig/Nim would add toolchain complexity with minimal safety gain for this specific output shape. Those were my considerations.


Replies

OutOfHereyesterday at 2:43 PM

> Rust/Zig/Nim would add toolchain complexity

Fair response in general, but Zig is well known to lower toolchain complexity, not add it.