4 ms·
It's amazing how coherent Zig's fundamental building blocks are as a programming language, everything fits together like a puzzle. This post reminds me of one
by vrnvu 1y ago
It's amazing how coherent Zig's fundamental building blocks are as a programming language, everything fits together like a puzzle.
This post reminds me of one of Andrew's early talks about the type system and the comptime... With the core building blocks, we can achieve elegant solutions without adding unnecessary syntax complexity.
- delifue 1y agoIn my opinion Zig is elegant except for one thing: cannot attach data to error. https://github.com/ziglang/zig/issues/2647 https://github.com/ziglang/zig/issues/2647 You have to workaround by things like passing into a pointer to error object.
- mark38848 1y agoYes also the function syntax is weird and ugly because functions aren't expressions.
- nextaccountic 1y agoWhat do you mean? pun fn f() { } ? How is this weird
- throwawaymaths 1y agoperfectly valid to do const f = fn (...) ... {...}
- nektro 1y agothis is because attaching a payload requires asking the question of who and how the memory of such a payload is managed, and Zig the language never prescribes you into a particular answer to that question.