News for hackers. Stuff that matters.
Re:How safe is Zig? by nine_k on Thursday June 23, 2022 @11:23PM (#31857448)
I would rather prefer the compiler to tell me: "Hey, this stack-allocated variable is escaping the function's scope, I can't do that! Allocate it somewhere outside the stack."

Maybe the compiler could offer me a simple way to fix the declaration somehow. But being explicit and transparent here feels important to me; if I wanted to second-guess the compiler and meditate over disassembly, I could pick C++.

Re:How safe is Zig? by flohofwoe on Friday June 24, 2022 @02:19AM (#31858343)
Since HN upvotes are invisible in the UI: +1. IMHO escaped locals should be an error, but not a hidden allocation.