this post was submitted on 23 Sep 2025
9 points (71.4% liked)
Programming
22883 readers
147 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
What happens to the pointers into the list when the list needs to reallocate its backing buffer when an "add" exceeds its capacity?
Rust's borrow checker isn't usually just a "Rust-ism". It's all low level languages, and many times also higher level languages. Zig doesn't let you ignore what Rust is protecting against, it just checks it differently and puts more responsibility on the developer.
The article even points this out. I personally think it's very good to have these two languages for these separate use cases.The right tool for the job and all that.
I agree, Zig is awesome. But the author missed the entire point of the borrow checker. It exists to make you a better programmer, not to just annoy you. The author immediately then showcased why the borrow checker exists in their example of why it's annoying lol.
In general, you are right. Once you explain to the borrow check you are doing the right thing then you have a fair level of confidence in it being right.
I think the point from the article is if it is worth it. Give the single sentence in the article about a list and pointer. There are various ways to do it safely (and ways to do it unsafely like you pointed out) and sometimes it might be ok to put the onus of that onto the developer and validated with valgrind, asans, and unit tests. For some this is far more enjoyable than worry about the borrow collector.
It's all a trade off and it's ok to have difference criteria when approaching a problem like a cli tool or even a business critical service. The problem becomes when Rust people claim that the borrow checker is the only way and we all roll our eyes.