What's Zig got that C, Rust and Go don't have? (with Loris Cro)
Zig is a programming language that’s attempting to become “the new C” – the language of choice for low-level systems programming and embedded hardware. Going into that space not only puts it in competition with C and C++, but also other newcomers like Rust and Go. So what makes Zig special?
Joining us to discuss it is Loris Cro from the Zig Foundation. We talk through Zig’s reasons to exist, its language design features, which parts of the C ecosystem it’s tackling, and how the Zig Foundation is set up for the long-term health of the language.
–
Loris’ website: https://kristoff.it/
Kris on Twitter: https://twitter.com/krisajenkins
Kris on LinkedIn: https://www.linkedin.com/in/krisjenkins/
Zig homepage: https://ziglang.org/
The “learn zig” guide: https://ziglearn.org/
Learn Zig with Ziglings: https://ziglings.org/
Find the Zig community: https://github.com/ziglang/zig/wiki/Community
Rust’s cargo-zigbuild: https://github.com/rust-cross/cargo-zigbuild
Using zig as a better linker: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html
“The Economics of Programming Languages” by Evan Czaplicki (Strange Loop 2023) – https://youtu.be/XZ3w_jec1v8
–
0:00 Intro
2:08 Podcast
1:22:08 Outro
#programming #programminglanguages #software #zig #ziglang #llvm #rust #go
by Developer Voices
linux foundation
Well, that was epic. It’s a bold new world. Downloading Zig now and going hard on the tutorials…
awestruck. this guy's ability to translate such complex ideas into info digestible to the avg programmer is unmatched.
42:00 its exactkly like go?
I've been "planning" a digital audio project for years (yes years, it's a hobby project I can faff around for as long as I like) and haven't been able to find the right language (I want high-level – but not too high and I want interop with assembly-language)… and Zig is my current candidate. The original code I worked on years ago was C++ and I don't want to go back there, I've considered Rust but it IS like C++'s type-safe younger brother like Loris says and we don't like that. But now I've heard that Andrew Kelley was actually working in the same area when he started on Zig, I think even more that it might be the answer I've been looking for.
Nice talk.
I mean rust has already "replaced" C, and go was never intended to replace C, but rather C++, and has since completely pivoted into devops and web dev and they basically wrote the entirety of cloud in it. I feel like the best replacement for C in terms of the language design as of time of writing is the Odin language, but it does not have large adoption nor is aiming for it.
Primeagen always totes zig and rust, that's where I heard it first I think.
14:01 That's incorrect. Rust can cross-compile not only Rust but also C, using de-facto standard cc crate. Build structure from cc crate has a target feature, that allows to specify the target for the compiled C library used in the project.
I don’t know what you did or how I found this video but this popped in my recommended and I gotta say, this is by far the best developer podcast I’ve ever listened to. Please change nothing. You ask excellent questions, you’re very attentive to your guest, and you allow them the freedom for them to go deep in order to open up a world of knowledge to the curious listener (such as myself).
Thank you so much for this wonderful content I am so grateful I happened upon and I am definitely subscribed now!
Awesome talk, I'm glad to have found this channel! It was very educational, and you were / Kris was a great listener. I hope I can learn Zig in the near future with a personal project.
Wonderful video by both participants. I didn't think I'd watch much of it because 83 minutes. Next thing I knew I was 70 minutes in and just stayed until the end.
I appreciated how the host gave so much space while intermittently prodding the discussion in interesting directions with well-prepared questions. I also liked how both participants spoke slowly enough with an attenuated tonal cadence for clear articulation and allowing the audience time to internalize what is being discussed without losing track of the flow of conversation. It was a calming experience that was easy to watch/listen to, which given the nature of the content, having such an easy-to-digest style is quite advantageous. There's already enough complexity in the content for us to parse that my attention was already quite occupied.
Just give me multiline comments.
So I lost 5 hours of life because of very stupid simple pointer pair mistake I did in the mmap code. 🙁 Yes, c sucks but it would have happened in zig as well.
nice talk!!
Excellent video, informative and honest (with zero language zealotism, which is rare). I look forward to try Zig if the right project shows up.
great interview, got a sub from me. love your format and questions, probably gonna binge your stuff with the free time from thanksgiving break.
I did the Ziglings, and I highly recommend both them and the language.
this is the most educative interview i have seen on internet. i would really want to learn more about systems programming from lori.
is there a short summary?
I was listening carefully about the stated shortcomings of Rust: I picked up on it needs to use some aspects of the C libraries for different platforms (is that a big problem though?), and it is a complex language (fair enough, takes a while to master it). I have been learning Rust recently and Zig came onto my radar for another language to keep an eye on. I did actually look at tutorial content for Zig but got a bit lost following it though.
Enjoyed every bit of the talk! Hope this channel grows and keeps you motivated to put out content 🙂
Amazing video!
19:31 llvm generates an ir code from what i understand which makes llvm portable. and it's easy to dunk on apple but it's apple that realized the potential of llvm over gcc.
maybe my children can use zig, not me, it's a long time, and may be in future, everything change, and zig sitll have to change, and just still developing haha
Go doesn't need lib c even on the system it runs on
I recently did a video series on using Zig on the raspberry pi pico. Where we develop a SIMON game in the course of 4 lessons. And I have to say, that Zig on the RP2040 (Pi Pico) is a blessing. Although the HAL doesn’t yet have all the features it is useful for
Most of your simple embedded stuff.
So I can’t wait seeing you do this on the Atmel side!
subscribed
Enjoyed it