3 ms·
What do you think of Zig so far? How do you recommend people get into it, especially those who don't have systems programming experience? Should you learn C fi
by modernerd 5y ago
What do you think of Zig so far?
How do you recommend people get into it, especially those who don't have systems programming experience? Should you learn C first?
- slimsag 5y agoI'm super productive in Zig, I really like the language. Documentation is lacking, so you're going to be reading the stdlib code. There are bugs. The current focus is on building the new stage2 compiler (going from C++ -> Zig implementation) so there are things that need attention that don't get it, yet. I would not suggest anyone learn C first if they don't have systems programming experience. I'd go for Zig, Rust (or Go, if you just want to dip your toes into the land of pointers) and depending on how comfortable you feel. If you start with one and find it super frustrating, try another, the difference between them is huge. You might personally feel more productive in one, leading to you learning more.
- jedisct1 5y agoSame here. As a compiled language, I find Zig super productive. There's neither "magic" nor an accumulation of abstraction layers. As a result, when there's a bug in my code, I can quickly understand what's going on and how to fix it. This is very refreshing.
- modernerd 5y agoThanks, this is helpful! Zig appeals to me for its philosophy, simplicity, community and cross-platform build tools. The main reason I haven't already adopted it is the lack of docs/educational material that has made getting started pretty rough for a frontend dev. A lot of the existing docs seem to start with the assumption that you're a lifelong C hacker who is already comfortable with manual memory management, libc, allocators, linking and all the rest, and that you're coming to Zig to gain quality of life improvements over C. I've dabbled with Rust/Go and found the docs/books much more accessible. But I didn't end up feeling an affinity for either language quite the same as Zig. (For Rust it was the complexity/readability and sluggish compile/dev loop; for Go it was the feeling that it wasn't really empowering me to do much that I couldn't already do quite comfortably with TypeScript/Deno, or stretching me to understand lower-level programming the way I'd hoped.) Thank you for zigmonthly.org and for Mach! I just sponsored you on GitHub. It's encouraging to hear buzz around Zig and see it being used for fun things. I'm tempted to persevere with Zig and write docs/guides pitched at those outside the traditional systems programming realm as I gain confidence with it.
- slimsag 5y agoSuper excited for Zig to make low-level coding more accessible to people outside the usual group of lifelong C hackers, as you said! That's one of the reasons I am betting on it. Check out https://zig.news https://zig.news too, it's where a ton of people are writing learning material / little tutorials on things.