4 ms·
Picked up zig a few days ago - similar experience. The build system and c-interop is amazing, targeting any arch/os from such a small toolchain makes me never
by kuroguro 4y ago
Picked up zig a few days ago - similar experience.
The build system and c-interop is amazing, targeting any arch/os from such a small toolchain makes me never want to use makefiles or even cmake again. The language itself definitely has a learning curve tho. Found myself fighting the syntax and needing some common things like sscanf often.
Btw kristoff's 4 part tutorial was really useful to integrate c libs: https://zig.news/kristoff/compile-a-c-c-project-with-zig-368j https://zig.news/kristoff/compile-a-c-c-project-with-zig-368...
- stephc_int13 4y agoThe integrated toolchain/build system and C/C++ compiler + easy interop is clearly well designed, valuable and practical. The only grips I have, so far, are some syntax idiosyncrasies. I am also afraid that their metaprogramming system will not turn out to be as a net positive. It is undeniably powerful (like all systems of this type are) and better designed than previous attempts, and yet this lead to issues about readability/debuggability and inflated compilation time. The old adage, less is more, is something that should be taken into account with programming language design.
- audunw 4y ago> The old adage, less is more, is something that should be taken into account with programming language design. This is a case of less is more, in a way. Instead of having to learn an entirely different, half-baked language to do metaprogramming (C defines/macros), you just have Zig. The only problem is that even though this approach leads to less additional added syntax for similar tasks, Zig unlocks potential for metaprogramming that goes far beyond C macros. And like with C macros, this could be abused. It's up to the user not to take it too far. But yes, there's issues with debugability. I hope Zig improves that