5 ms·
Zig 0.15.1
- coffeeindex 1y agoSeems like a lot of changes to be a .1 release, no? Really excited for I/O as an interface!
- do_not_redeem 1y agoThose were all changes in 0.15.0, but we snuck a few bugfix PRs in for a quick patch release before Andrew finished writing the release notes ;)
- squeek502 1y ago0.15.0 was effectively skipped: https://github.com/ziglang/www.ziglang.org/commit/1be0f80b15d256d42411a21f10e208f9b269a5e2 https://github.com/ziglang/www.ziglang.org/commit/1be0f80b15...
- meepmorp 1y agoyeah, some jerk filed a windows https bug after the release had been tagged
- matu3ba 1y agoExcellent news. Will be very interesting how the debugging experience will improve with scheduling, recording of io and reversal computing between io.
- Graziano_M 1y ago> a better appraoch—less prone to typos and bitrotting Clever irony if intentional!
- johntash 1y agoCan anyone sell me on learning Zig vs Rust? Not for work, just some personal projects I thought about doing in Go but decided learning Rust instead might be fun.
- horenso 1y agoTry a few different languages to see what fits your style. I'm a fan of both Rust and Zig, but I've been really enjoying Zig lately. Rust has a cool concept called ownership to prevent memory bugs. This means you have to learn new ideas like lifetimes. For instance, an array doesn't just hold objects; it has a lifetime of its own, so you can only store references that will last at least as long as the array. It's most useful IMHO for programs with many independent lifetimes because it makes writing memory-safe code much easier. It really leans into the concept RAII which comes from C++. You implement types and define what it means to create, copy, "move" and destroy them. Zig on the other hand feels incredibly lightweight. It's like C, but with way fewer pitfalls and better tools. For instance, tts default DebugAllocator tracks memory leaks at runtime, which is good enough for many situations and makes the language less complex to work with. It is common in Zig to pass Allocators, which makes you think more about pooling allocations and simpler allocation strategies. I think learning low level concepts like memory management, pointers, memory layout, interfacing with the OS etc. is easier is fantastic in Zig.
- johntash 1y agoThanks! I probably will end up trying both at least a little bit. Rust's memory management did sound neat when I was reading about it. Rust is also more mature, so probably more useful for now. I really like Go's simplicity though, which makes Zig sound interesting too. I also just remembered Nim. I didn't get very far with it, but it also seemed cool.
- your_fin 1y agoVery roughly, Zig is much closer to Go in terms of philosophy of language design, where as Rust is much closer to Go in terms of the kind of software people write with it. Go and Zig are both aggressively small and portable languages, and e.g. prefer explicit `defer` where Rust would handle cleanup implicitly. Unlike Zig, Go and Rust are both widely used and mature ~tier-1 languages with a deep bench of native libraries. However, there's a deep gulf between their philosophies. Go values a shallow learning curve and making code easy to write, whereas Rust values expressivness and making it hard to write bad code. This is not to say that you can't write Good Software in Go or make money with Rust code. However, the languages tend to attract distinct groups of programmers, and there's a reason flamewars crop up between their proponents with unusual regularity. Zig is notable for targeting C's niches of having lots of structural flexibility in memory management, being good at calling C code, and building C programs. C is the native language of most truly powerful interfaces (operating systems, graphics, cryptography, databases, other programming languages, device drivers, low-level networking, etc.), and programs primarily concerned with interfacing with such things tend to be better off written in C. Working with C code is in the happy path for Zig, while other mainstream programming languages demand significant specialized expertise or wrapper libraries (1). Wrapper libraries aren't always available, are almost always less useful than the original, and only save you /some/ build headaches. This makes Zig a candidate in many situations where C - and /maybe/ C++ - are the only real competition. In short: If your interest is learning new ways to think about writing programs, Rust will give you a more distinct perspective than Zig. Like Go, there will be lots of libraries and guides to help you out. If your interest is in learning to write a kind of program you couldn't in Go and think "closer to the metal", Zig is likely better suited to task. (1): This isn't nearly as true for C++, but there's still enough impeadence mismatch between idiomatic C and C++ to invite interfacing bugs and wrapper libraries.
- ksec 1y agoSort of off topic but I really wish Zig would put Date in their release notes. For instance I didn't know if 0.15 is new, or from a few months ago. Every time a new release I had to go to Github and check the release date. It doesn't even need to be exact but something like August 2025 would have been fine to give some context of when this was released. > - async and await keywords removed I think by all accounts Andrew has continue to show he is extremely pragmatic with every decision, trying to test new and old theories to the limit and pick what is most coherent and best for Zig. Cant wait for 1.0
- MaskRay 1y agoI don't follow Zig's development. https://ziglang.org/download/0.15.1/release-notes.html#Motivation https://ziglang.org/download/0.15.1/release-notes.html#Motiv... feels vague to me, and linking to a lengthy video isn't very clarifying. Still, I skimmed through it to get a sense of it. Zig's approach seems to require users to explicitly call flush for any writes. This reminds me of a similar issue in LLVM's `raw_svector_ostream`. Before a 2015 commit https://github.com/llvm/llvm-project/commit/3d1173ba1a53cab08ed2c33e47dd617df77a914b https://github.com/llvm/llvm-project/commit/3d1173ba1a53cab0... , it only called flush at the end, which was efficient. That commit changed this, leading to unnecessarily slow performance. To not break existing users, the 2024 pull request https://github.com/llvm/llvm-project/pull/97704 https://github.com/llvm/llvm-project/pull/97704 tries to implement a new interface, but the changes would cause significant churn. @aengelke