Where Do I Find Them Conventions

I would say at this point in time while the language is changing especially with 16.x that a lot of conventions are simply learned over time still. I picked up Zig maybe 10 months ago and the changes in that time really rather, enormous. Some of those conventions are gone and new ones are arriving.

If you are looking for style related than the docs has a section for style:

If you are looking for design patterns checkout this thread:

For everything else I would recommend reading the Docs in their entirety and then go read the relevant source code from std. You will pick up a lot of really good information from just reading std.

Personally coming from a Rust/Webdev background I didn’t find allocators hard so much as base memory concepts like *anyopaque, alignment, pointer casting, closures, etc… For that I really recommend just having Ziggit around and searching through the forum for the answer, and sometimes depending on what you are trying to do you may be the one finding out that answers.

For comp time related topics, there are some really good youtube videos out there, but really I think the one thing that helped me better understand how comptime worked was building my own things and also referring to this repo:

While it is not in anyway a how to or documentation, the techniques used in this repo really helped me better explore the comptime space and learn what it is capable of.

Really in order of importance:
Do ziglings>Zig documentation>Patterns Link>Read lots of source>any llm.
LLms aren’t super super helpful in zig as the language changes so much between versions still and even then LLM’s kind of break down on the large context that is required to work with zig.

5 Likes