zig.guide icon indicating copy to clipboard operation
zig.guide copied to clipboard

`try` and "payload capture" are introduced early without explanation.

Open Jimmy-Z opened this issue 5 months ago • 0 comments

First of all, thanks for the guide, I like its conciseness especially.

try

As early as "Getting Started - Running Tests", this is quite confusing, especially since zig use the keyword try very differently, I went back multiple times to confirm if I missed something until I reach "Errors".

and to add more confusion, there is a remark:

Try the same test without the try keyword. What happened?

It's not really explaining try, it's about not consuming an error union.

payload capture

in "Unions":

Here we make use of payload capturing again

it actually did appear in "For loops", but there's no mentioning of the wording "payload capturing".

I think something like "the keyword try/payload capture will be explained later" would be enough and provide some peace to readers.

Jimmy-Z avatar Jul 17 '25 08:07 Jimmy-Z