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

As someone doing mostly C development at work I've really come to enjoy Zig in my side projects at home. At work we are moving a lot of newer development to Rust, which makes sense in terms of safety, the speed we want from C and "modernising"/becoming more attractive as an employer. However, when I'm doing projects for my own amusement at home I want something that doesn't feel like work, and getting into Zig and have something working took me no time. It's so easy to interface with C libraries that I can spin up most things with existing C libraries for the things Zig doesn't already provide itself.


Yep, exactly. I was originally pretty excited about Rust, but I feel like it biases toward large highly-structured projects like C++ does, making it a bit daunting for personal projects. Just a bit too professional for something I'm hacking together over a weekend, lol. Zig feels like it's easier to wrap my head around, and seems optimized for the "pet project" use case.

I also feel like learning Zig is helping me better understand C. I probably wouldn't have been able to contribute much to that Wine patch if Zig hadn't already gotten me more comfortable with pointers, statically-allocated variables, and such in a reasonably-safe way (having prior experience with Perl did help a little bit for pointers, since referencing and dereferencing variables is pretty common in Perl codebases, but it always felt a bit detached from what the machine was actually doing behind the scenes).




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

Search: