I tried Zig recently but I found the unsilenceable lints to be a huge productivity killer. I actually posted a link to the GitHub issue this morning. https://news.ycombinator.com/item?id=32751317

This makes a normal workflow with `watchexec zig test` basically impossible, since before I can even run the tests I have to spend time hunting down which variables are used/unused at the moment and (un)commenting them. And it seems like they're planning to double down on this by making you adjust even more trivial things like public/private and var/const before it will even compile your code. https://github.com/ziglang/zig/issues/335 https://github.com/ziglang/zig/issues/224

Maybe I'm a bad developer, but my code is never perfect the first time around. I always spend time experimenting and refining my designs. I want to find a design that works, and only then spend time polishing and prettifying before I git push.

I do understand the reasoning (they don't want people committing poor quality code), but this implementation just seems completely backwards to me. It breaks the natural order. It's like saying we won't let you ctrl+s until your tests pass to make sure you don't commit broken code. Stop nannying me and let me get my work done!

> I do understand the reasoning (they don't want people committing poor quality code)

Not that this lint actually achieves that, or even prevents real errors. Go has the same, and it's so simplistic as to only be annoying. For instance not sure whether this fails in Zig but Go will allow this:

    v1, err := Foo()
    if err != nil {
        return nil, err
    }
    v2, err := Bar(v1)
    return v2, nil
Error of second call is never checked, but go has no issue with that, because it only tracks definitions per use.

    v1, err := Foo()
    v2, err := Bar(v1)
    if err != nil {
        return nil, err
    }
    return v2, nil
also works fine, despite probably sending complete nonsense to Bar, for the same reason.

But then it's an absolute pain in the ass every time you're fucking around and stop using a debug import or whatever.

This really irritated me when I started working with go, but it stopped bothering me and now I even mostly like it.

The missing error checks are annoying, but if you have appropriate editor config it is hard to miss them: https://cdn.billmill.org/static/newsyctmp/warning.png

Basically writing go without `staticcheck`[1] is not recommended. If you do have it set up, it's pretty easy to avoid simple errors like that. I do wish the compiler checked it for you.

[1]: https://staticcheck.io/

Use golangci-lint (https://golangci-lint.run, https://github.com/golangci/golangci-lint) which combines all of the best lints (including staticcheck).