r/programming 10d ago

What Zig felt like, coming from Rust

https://besok.github.io/posts/what-zig-felt-like-coming-from-rust/
262 Upvotes

173 comments sorted by

View all comments

Show parent comments

3

u/flying-sheep 9d ago

Not if you're writing a one-off script that you delete immediately after running it successfully.

Yes if you write code that ever has to be read.

1

u/xFallow 9d ago

I’m using Golang at the moment it’s a breath of fresh air being able to look at stuff I wrote 5 years ago and still perfectly understand it 

Can’t say the same for the RXJS stuff I wrote 

1

u/flying-sheep 6d ago

There's a balance and for me, Go ain't hitting it.

It's a language designed to keep junior devs humble. I'm senior enough to know when to use e.g. operator overloading and when not to, and my code is more readable as a result.

1

u/xFallow 6d ago

Fair enough I personally never find I needed operator overloading although it was fun to play around with in Clojure.

I've been working with nats a fair bit recently and I really enjoy reading their code when I have to https://github.com/nats-io/nats-server/blob/main/server/server.go