Error payloads in Zig

25 points by winter


mitchellh

Big fan of sharing this as a gist. I know its polarizing, but I'm very strongly on the side that we should be copying and pasting more code and the downsides about it are mostly fear mongering (imo, many many more issues come up by updating/changing code than by considering it done).

The line is grey of course but stuff like this where it all fits in a single file and isn't security sensitive (no networking, crypto, file access, etc.) should just be copied and pasted and the gist encourages that.

My only recommendation would be to add some tests to the file. :)