News for hackers. Stuff that matters.
Re:Why Zig when there is already C++, D, and Rust? by kristoff_it on Friday January 15, 2021 @08:29PM (#25799005)
The compiler infers the errors in an error set even if you don't declare it explicitly (e.g. when returning `!void`). This means that you can use a switch statement to have the compiler tell you what cases it contains.

There's also ZLS, a language server implementation for Zig that I believe can help with that (or if not today, it will in the future).

Re:Why Zig when there is already C++, D, and Rust? by crowhack on Friday January 15, 2021 @09:00PM (#25799190)
Cool trick, I did not know this, but it makes sense.