Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Zig, by comparison, offered little beyond syntax highlighting and basic autocompletion.

Zig has a language server and "The majority of LSP features are supported" (https://github.com/zigtools/zls#features).

 help



Zig had a breaking change half year ago and since then ZLS only works for std and local code, not for any deps. Zig is nice language but dev experience is a real nightmare at the moment. I say that as maintainer of three non-trivial libraries, and I have one Zig project in production.

That said, I've been re-evaluating my choices lately.


Learned today why there is no "zig metadata" command. A dependency can be marked lazy, so whether you even need it depends on the build flags you pass.

So ZLS has to actually run your "build.zig" to see the modules

That is why it breaks when Zig changes the build system.

https://vectree.io/c/zigs-build-system-protocol-module-graph...


0.17 will fix the build-system related ZLS problems.

> That said, I've been re-evaluating my choices lately.

I see you have a blog - it would be interesting if you wrote up the results of your thought process, whichever way you decide in the end.

As a PL nerd, I really enjoy reading well-informed takes from people who have seriously used a language as to its strengths and weaknesses.


I didn't have enough time for blogging lately, so I can only offer short posts like this: https://ziggit.dev/t/from-a-developer-soon-to-retire/17643/3...

I've been also very skeptical about Rust in the past, and all my points still hold (traits vs. accidental complexity, no introspection, barely usable macros, borrow checker awkward to use with arenas, orphan rule) but what's changed is that I won't be writing any of that myself, and LLMs are good in generating all sorts of glue and they are incredibly good at figuring out what's wrong, they just never get tired. so lots of Zig benefits are simply not relevant IMO.

one extra thing - Zig doesn't have interfaces, we often use comptime duck-typing and it works great, until it doesn't. it's not common but when you hit such case, it really sucks. I've realized that during my `serde` rabbit-hole and I had to revert the whole feature and scratch it. it was not obvious to me when I started but it's now clear to me that Rust really is higher-level PL than Zig. another example is Zig IO, I think it's screaming for interfaces, yet Zig is trying to pull all sorts of awkward hacks just to avoid it. it's sort of like when Go was avoiding generics but we all knew it's inevitable.

my current theory about Rust is that it might be bearable for my sorts of projects, given specific code guidelines. sort of like people writing C-style C++.


That's why they move to Helix

And Zig VScode extension is quite good.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: