3 ms·
Any recommendations on learning more about what constitutes idiomatic zig? This is an issue I have with learning any new language - it’s kind of hard for me to
by rgrmrts 5y ago
Any recommendations on learning more about what constitutes idiomatic zig? This is an issue I have with learning any new language - it’s kind of hard for me to figure out what writing idiomatic code in that language looks like. I usually go looking for popular/high quality projects and reading that code but it takes away from the experience of actually just toying around not to mention it being hard knowing what a high quality project is. Thanks in advance!
- gavinray 5y agohttps://ziglearn.org/ https://ziglearn.org/
- dnautics 5y agoI don't think of this as an idiomaticity guide.
- gavinray 5y agoIt's unfortunately the only comprehensive reference I know of besides the official docs. There is "Ziglings", but those are a collection of small exercises with answers rather than a full guide. https://github.com/ratfactor/ziglings https://github.com/ratfactor/ziglings If you know of better resources than these two, please do share (not being passive aggressive here).
- dnautics 5y agohonestly, the standard library. But there should be an idiomaticity guide. At least for capitalization patterns, any other naming conventions, etc (things that zig fmt can't capture). I don't know that this officially exists, anywhere yet. Here is an example of what I'm talking about in my $DAYJOB lang: https://hexdocs.pm/elixir/naming-conventions.html#content https://hexdocs.pm/elixir/naming-conventions.html#content edit: see sibling comment, apparently I never noticed the style guide in the standard docs
- deleted 5y ago[deleted]
- cturtle 5y agoThe style guide in the language reference explains the accepted naming conventions [0]. [0]: https://ziglang.org/documentation/master/#Style-Guide https://ziglang.org/documentation/master/#Style-Guide