Idioms/quirks for Zig

Hi guys, I create this repository to collect Zig idioms, hope it’s helpful for others. :beer:

As always, any feedback is welcome.


Nice job! I bookmarked your repo for the future :slightly_smiling_face:

stupid question - what is the difference between “idioms” and “quirks”?

for me “idioms” are like “some standard common ways to perform a task”,
while “quirks” are… well, quirks are some unusual (for someone) things.

why mixing idioms (kinda good things) with quirks (kinda strange things)?

I can’t speak for the original author, but quirks do change how people write code. A great example of this is “the most vexing parse” from C++. It’s such a common quirk that people idiomatically handle it in a particular way.

Personally, I would keep them separate, but I can understand why someone may want to do both at once.


yes… English is not my native language, but when I see something like “more idiomatic way to do this/that is…” I think to myself - “Oh, this, bless me, is what x-lang-people usually write in their code, I definitely will use that in mine!!!” and when I see the word “quirks”, I think to myself - “hmm… x-lang has some problems?.. May be I should think hard before using this x-lang?..”

Do not take it seriously, sometimes programmers are sorta linguists :upside_down_face:


Hi, thanks for your interests. I have updated readme to explain the purpose of this project. Copy here for your reference

Zig, despite its simplicity, harbors unique features rarely found in other programming languages. This project aims to collect these techniques, serving as a valuable complement to the Zig Language Reference.

As for your original question, I pay little attention to choose words(English is not my native also), so there’s no need to get too hung up on this. :grin: