Comment

Comment by simjnd

But the capture is conditional so it makes sense.

if (evaluation) result = evaluation

if (evaluation) |result|

Although assignments as expressions in C are convenient, I don't think they make a ton of sense and find Zig's capture easier to read (easier to immediately see what's being evaluated)

parent simjnd 2 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton