News for hackers. Stuff that matters.
Re:Zig's Curious Multi-Sequence for Loops by tomck on Tuesday February 28, 2023 @01:07PM (#34972625)
You can tell when, because if it uses the allocator it will return an error. So the first line definitely doesn't allocate, and the second definitely does.

That is, unless you explicitly handle OOM conditions inside your construct, e.g. 'crash if you're OOM', which isn't typical in zig code. All code I interact with will return an allocator error if allocation fails.

There are no comments on this comment yet.