←back to thread

Open-source Zig book

(www.zigbook.net)
692 points rudedogg | 10 comments | | HN request time: 0.996s | source | bottom
1. virajk_31 ◴[] No.45952121[source]
Folks! do I really need learn Zig? I am already good with Rust!!
replies(3): >>45952129 #>>45952219 #>>45952522 #
2. epolanski ◴[] No.45952129[source]
Bar C if you're into system's programming there's no language you *need* to learn.
replies(1): >>45952201 #
3. virajk_31 ◴[] No.45952201[source]
Partially agree on this, std lib/crates and ease of use do make a difference (this is not even the main reason to use Rust), though Rust certainly has its own headaches. (Imagine searching for someone's implementation of HashedMap on github or using dedicated packages like glib, when you get it easily at crates.io). Again this is subjective based on use cases.
replies(1): >>45956283 #
4. tamnd ◴[] No.45952219[source]
Yeah, you should. Zig is a trending language right now, and in the coming years many projects are likely to be rewritten in Zig instead of Rust (often referred to as "riiz").
replies(2): >>45952364 #>>45952540 #
5. virajk_31 ◴[] No.45952364[source]
Is this sarcasm? if yes I got your joke otherwise please enlighten me _/\_
replies(1): >>45953378 #
6. benrutter ◴[] No.45952522[source]
I don't think you need to learn anything! Especially if you like Rust and it works for your projects.

Not an expert but Zig seems like a modern C - you manage memory yourself. I guess if you want more modern features than C offers, and actively don't want the type-system sort of features that Zig has (or are grumpy about compile times, etc) then it's there for you to try!

7. WA ◴[] No.45952540[source]
So, a new JS linter written in Zig, when?
replies(1): >>45952789 #
8. virajk_31 ◴[] No.45952789{3}[source]
is it even required?
9. tamnd ◴[] No.45953378{3}[source]
I was half joking. Folks keep saying everything will get rewritten in Zig, so I played along with that. Nothing serious behind it.

With only half serious intent, I think only the real wizard types, like Jarred Sumner (Bun) and Mitchell Hashimoto (Ghostty), who understand both low level systems and higher level languages, should be writing big tools in Zig. The tough part in the next few years will not be building things, it will be keeping them alive if the authors step away or the ecosystems move in a different direction.

10. epolanski ◴[] No.45956283{3}[source]
Not much for authoring new code as much as reading it, it's the lingua franca.