News for hackers. Stuff that matters.
Re:Why is Zig so Cool? by Galanwe on Saturday November 08, 2025 @05:42AM (#45855739)
> Preventing data being attached to an error forces more clear and precise errors.

Okay maybe theorically, but in the real world I would like to have the filename on a "file not found", an address on a "connection timeout", a retry count on a "too many failures", etc.

Re:Why is Zig so Cool? by audunw on Saturday November 08, 2025 @09:49AM (#45856982)
But also in the real world I may not be interested in any error information for the library I’m using. I’d like to be able to pass a null for the error information structure and have the compile optimize away everything related to tracking and storing error information.

I’d like my parser library to be able to give me the exact file, line and column number an error occurred. But I’d also like to use the library in a “just give me an error if something failed, I don’t really care why” mode.