Hacker News new | ask | show | jobs
by DanielHB 349 days ago
> Zig already has the highest quality toolchain and std lib of anything I would use.

My couple of days experience with Zig was very lackluster with the std lib, not that it is bad, but feels like it is lacking a lot of bare essentials. To be expected for a new pre-1.0 language of course.

1 comments

Depends on which language you're coming from. Compared to C or even C++, the Zig stdlib has already many more things to offer. Compared to Python or Node.js it's quite bare bones.
Fair, I was mentally comparing to Go. I was a bit disappointed there wasn't more wrappers around basic OS stuff. Go stdlib wraps everything and does its best to make stuff cross-platform.

In my specific case I was trying to send some DNS messages. I went the route of linking libc and using the posix data structures for DNS messages and struggled quite a bit how to map the C data structures to my program.

This kind of thing is a big barrier to adoption unfortunately.

Go is literally a Kitchen Sink. I love it, but that stdlib comes with a runtime dependency.