Source code to read for begginer

hi. I am a python programmer and it is my first time learning low level language. I’ve recently finished ziglings exercises. Any source code to read and study to improve my understanding of zig?

I always recommend that reading “array_list.zig” first: zig/lib/std/array_list.zig at master · ziglang/zig · GitHub

IMO, pick some data structures that you are interested in and start there - especially ones you intend to use. It’s a great way to quickly pick up good habits.

Then, I’d pick a couple functions in mem. There’s a lot to choose from in there, like the trimming, tokenizing, and searches in the “indexOf” function family: zig/lib/std/mem.zig at master · ziglang/zig · GitHub

Then I’d read meta to learn about how to use the type system more thoroughly: zig/lib/std/meta.zig at master · ziglang/zig · GitHub

At that point, you’re pretty well equipped as a reader. Good luck!

6 Likes

Thank you! I will check them out.

the std library is especially good since it has comments like calling this function is usually a bug (not a serious answer to your question, but… have fun :slight_smile: )

1 Like