in general, I like zig syntax, but i find that it had very little regard to how the eye moves on the page. it’s jarring at times.
in general, I like zig syntax, but i find that it had very little regard to how the eye moves on the page. it’s jarring at times.
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)
resultA : resultB ? (evaluation)
if we always put result first?
I think the most important piece of if statements and ternaries is the condition being evaluated and it's worth putting that first?
and ternary is a branch with no variable introduction, so it doesn’t apply again.
(it’s basically a weak switch expression, and the value moves leftwards towards its invocation.)