4 ms·
TLDR: The author discuss its subjectivity towards the language. In short, they're not a fan of how zig handles errors, some loop constructs and the language des
by skywal_l 5y ago
TLDR: The author discuss its subjectivity towards the language. In short, they're not a fan of how zig handles errors, some loop constructs and the language design regarding keywords and built-in functions. They will not use the language even though it comes with interesting innovations.
On the first two points, it's disappointing not to see a discussion on the goals of zig and why these choices were made [0]. Like any trade-off, there is a reason behind it.
The third point, which occupies the biggest paragraph, is somewhat irrelevant to me.
An interesting take but which remains at the surface. Might not be worth the 5 minutes it takes to read it.
[0] https://ziglang.org/learn/overview/ https://ziglang.org/learn/overview/
- synergy20 5y agowhy is this downvoted? I like the short description. I spent a few hours two weeks ago to walk through ziglang's tutorial(to see how fit it is to replace c/c++ for system programming), my summary so far is: interesting stuff, but not good enough for me to switch yet. Will be on my watch list for next few years. Did similar thing with rust(ziglang to c vs rust to c++), decided to stay with modern c++ but will keep an eye on rust as well.
- karmakaze 5y agoThis was my first assessment for my own use as well. Seems very much a 'kitchen sink' language that has everything, but nothing in particular that draws me to it. If I had pick out one differentiator it would be that the weird case/camel-insensitivity makes integrating convenient.
- aserafini 5y agoWhat case/camel-insensitivity are you referring to?
- nrclark 5y agoAre you possibly thinking of Nim instead of Zig here?
- karmakaze 5y agoThank you, you are so right. I was thrown off by seeing a mix of snake_case and camelCase. I'll have to give Zig a read and make an actual assessment. Glad for the possibilities!
- karmakaze 5y agoI'm really digging what I'm reading so far. if (optional_foo) |foo| { doSomethingWithFoo(foo); } ..could be flow sensitive with optional_foo being non-? inside the block like some languages have done. Well the In-depth Overview ticks all my boxes giving Zig worth a deeper look: > Zig 0.5.0 introduced async functions. This feature has no dependency on a host operating system or even heap-allocated memory. That means async functions are available for the freestanding target. > Zig infers whether a function is async, and allows async/await on non-async functions, which means that Zig libraries are agnostic of blocking vs async I/O. Zig avoids function colors. > The Zig Standard Library implements an event loop that multiplexes async functions onto a thread pool for M:N concurrency. Multithreading safety and race detection are areas of active research.
- nrclark 5y agoIt's got really cool metaprogramming features too, if you like those. Kind of like C++ consteval/constexpr but on steroids. Language BDFL doesn't recommend using it in prod yet, but I've really enjoyed a couple of hobby projects.
- AnIdiotOnTheNet 5y agoAs mentioned in a reply to your other post, Zig has no such feature except within number literals. `12345E04` is equivalent to `12_345e04`, but `identifierName` is wholly separate from `identifier_name`.