3 ms·
The only advantage Zig has is its ability to consume C/C++ as it ships with clang That's about it, the language is too verbose and sometimes not enough verbose
by WhereIsTheTruth 4y ago
The only advantage Zig has is its ability to consume C/C++ as it ships with clang
That's about it, the language is too verbose and sometimes not enough verbose with all these .{} you need to always look at the documentation to remember what this does, this is time consuming and does useless context switches
Last time i tried to build their language server to use in my editor, and i was surprised it took an eternity to compile, similar to rust here, i was hoping it would do better
I love the build.zig feature, you stick to 1 language, there is no json/yaml/toml/xml BS, it's very refreshing to see
Cons:
- erognomics
- slow to compile
- verbose but sometimes not (.{})
Pros:
- builtin C/C++ compiler
- build.zig
- files are structs
- lazy compilation model (you can write platform specific code very easily without bloating your project)
- stephc_int13 4y agoI tend to agree with most of your remarks. Zig would clearly be a better choice than Rust to replace C. Zig is also better than C in some ways, but worse in others, this is frustrating. The trick is that most of the good parts are either transient QoL improvements (such as the build system) or guard rails to avoid costly mistakes (no macros, explicit memory management) but the drawbacks (annoying syntax, peculiarities, probably trying to do too much) seems to be long-lasting daily annoyances. I am waiting for 1.0 and also for Jai.