I joined in the wrong time or it is intentionally, made to make it hard for new commerce to coup with Zig.
Why it is mind stretching and difficult to right a code to fetch any dir or file, for this simples tasks can’t we have simple library putting everything in std is this a good Idea Idk. but it makes zig too much verbose. where I thing we could have had a Separate @import(“File”).
I just started and seeing similar pattern why I hated RUST in the first place.
IDK if I can help with the libraries. but I really think the standard libraries should be simple and easier to use.
Just my two cents and an encouragement to keep at it, even though it’s not easy:
(TLDR: hard learning is good. Especially if you do it right [don’t use LLMs])
As someone in a similar position of learning Zig as of (relatively) recently, I think it is worth acknowledging to yourself that you are going to have some struggles with the language for a while.
It’s still in development, the documentation (while actually quite high-quality in my opinion, though the stdlib docs could be better commented) isn’t really streamlined to provide you a shoe-in template of common use cases, and the compiler loves yelling at you for every little mistake. (Don’t get me wrong, I think that’s good.)
All of that said, this also has the potential to be a very powerful learning experience for you. It certainly has been for me.
With other, more mature languages, there are more examples, guides, tutorials. One can be pointed in the right direction and learn how to use a subset of the language / stdlib at a time without having to dig directly into the docs. You might be able to find exactly the tool you needed to complete the job, but in return you don’t end up experiencing that struggle of wading through the quagmire that ends up turning you into someone more broadly familiar with the deeper workings of a language / its libraries.
In a weird way, learning Zig now as opposed to in 20 years when it is more widespread (or not, who knows?) will probably force you to learn it more deeply than you would otherwise. And even if you don’t end up sticking with Zig (I might not. I certainly can’t predict the future), that sort of learning expands the mind in ways that it never quite shrinks back to its previous, more limited dimensions.
If none of that appeals to you, go use Python or C. They’ll probably do whatever you need, and there are plentiful resources on their use.
The first time you do something in a new way, it is normal for it to take a long time. Typically that reflects more on your skill level than it does on the tool.