Hacker News new | ask | show | jobs
by ChubbyGlasses 1134 days ago
idk about a "war" or we, but features aside, zig feels like a less obnoxious language, and i mean that as politely as possible. to make an analogy, rust is like a friend that constantly nags about _everything_; like you know they mean well, but girl chill i know. about to cross a street, rust reminds you to look both ways. empty street with no cars around and it's safe to cross, rust wont let you cross until the crosswalk sign lights up. cooking something, rust will pester you about proper knife safety. like yes i know, being a nuisance about things i already know about doesn't help me write better software; i already know to look both ways before crossing. every once in a while it catches something you wouldn't have otherwise, but you have to deal with that constant pestering _all_ the time. also, just my personal opinion, but rust has some of the worst language ergonomics i've seen in any modern mainstream language and i don't think it can reasonably be fixed due to its 1.0 promise
2 comments

Rust is annoying when you are doing something you know is sound, "yes I looked both ways and re-checked twice, chill out OK", but the compiler yells at you anyway. Zig is great in such situations. Rust really shines when you are doing something you are not confident at all in—juggling 17 knives, in a large codebase with many contributors that you are new to, and you haven't had any coffee—and you can relax because you know the compiler will catch your soundness mistakes.

Good blog post to this effect: https://matklad.github.io/2023/03/26/zig-and-rust.html

I find rust easy to use when you are doing high level programming, but it becomes very annoying language when you are trying to do something low level, or trying to manage memory yourself.