Basic MetaProgramming in Zig(openmymind.net) |
Basic MetaProgramming in Zig(openmymind.net) |
I often just take an approach similar to cog [1], but it's simple enough I prefer to roll my own to do whatever code generation I'm wanting. E.g. write a ~100 line python file that reads source file(s), reads special comments with code gen or introspection instructions, and then insert generated code at some designated point(s).
Off course one can just hunt down the advance material looking through discord, read the bigger zig codebases etc but having it all in one place a couple of books that describe and explains is just way better to level up and get rid of the skill issue :)
By applying the architecture designs from key references like Edward Yourdon books, which are from the structure architecture wave, that predated the OOP patterns wave.