3 ms·
Why Zig Is Quietly Doing What Rust Couldn't: Staying Simple
- simonask 1y agoI stopped reading when he compared the Rust compiler to his angry ex. Like, what are we doing. This “article” is flame bait.
- gabrielgio 1y agoI read it through and there is nothing much there. Most of his points don't hold up to reality as rust is no longer (and hasn't been for a while) a "hyped language" and has proven time and time again to be a valuable language.
- _fizz_buzz_ 1y agoUntil it gets widely adopted and people want to have certain feature, etc.
- davidsainez 1y agoGolang I think (mostly) successfully resisted this temptation
- Simran-B 1y agoGenerics though
- 0-R-1-0-N 1y agoConsidering language syntax proposals aren’t accepted anymore and they have a culture of being minimal I believe it will remain so.
- hiccuphippo 1y agoThere's a reason it's in 0.x and will not reach 1.0 for a while.
- ashdnazg 1y agoSeems to be hugged to death: https://archive.is/UauYs https://archive.is/UauYs
- ZeelRajodiya 1y agoThanks man!
- anttiharju 1y agoFeels heavily AI-written, em dashes and the filler.
- deleted 1y ago[deleted]
- can3p 1y agoReads like a straw man. Was "being simple" anywhere in rust lang agenda?
- bjackman 1y agoIt's fair to complain about Rust complexity IMO. What's _not_ fair is pointing at Zig as an example of how it could be simpler, when it's not memory safe. The requirements are different. At that point we might as well say "why use Rust when you can just use Go or TypeScript"
- deleted 1y ago[deleted]
- MrJohz 1y agoFreedium is down, you may be able to read this using Medium instead: https://medium.com/@daxx5/why-zig-is-quietly-doing-what-rust-couldnt-staying-simple-a47f86b3a58a https://medium.com/@daxx5/why-zig-is-quietly-doing-what-rust... I could only see the first few paragraphs, but the writing is giving off a lot of "AI slop" vibes (or perhaps even "human-written slop", let's give the author the benefit of the doubt). So maybe it's no great loss if it's behind a Medium paywall.
- orangeboats 1y agoThis was posted less than 2 weeks ago. Why bother doing it again? https://news.ycombinator.com/item?id=45849204 https://news.ycombinator.com/item?id=45849204
- CryZe 1y agoZig has no undefined behavior?
- Simran-B 1y agoZig has the concept of illegal behavior, of which a subset is unchecked illegal behavior - basically undefined behavior, but if evaluated at comptime, it results in a compile error. The documentation also states that most illegal behavior is safety-checked unless you use the ReleaseFast or ReleaseSmall optimization modes (and don't enable safety checks for individual blocks).
- captainbland 1y ago> Rust shouted about safety. Zig just built it This makes it sound like Zig built Rust equivalent safety but its manual memory model suggests otherwise?
- rini17 1y agoPerl too was refreshingly simple and DWIM(Do What I Mean). And then it wasn't.
- nottorp 1y agoA thought: is using Rust a form of avoiding responsability? And a second thought since the article seems to be flagged now: considering the fan reaction to a post disparaging their favorite language, how is the Rust community different from a religious cult now?
- aw1621107 1y ago> is using Rust a form of avoiding responsability? How so? > considering the fan reaction to a post disparaging their favorite language, how is the Rust community different from a religious cult now? Believe it or not, not all criticism is created equal. High-quality criticism is consistently well-received from what I've seen. This doesn't seem to get particularly close to that bar.
- nottorp 1y agoI don't think i've seen on HN discussions any criticism directed at rust that was acknowledged as high quality though.
- aw1621107 1y agoProbably the best example I can think of off the top of my head is "Leaving Rust gamedev after 3 years", which got a fair bit of (positive!) attention both on HN [0] and on /r/rust [1]. If you look through the comments there a huge proportion of them generally agree with the article, and the top comment explicitly calls it "a good article". On /r/rust Josh Triplett (one of the Rust devs) has the top comment on the post basically acknowledging that the criticisms are valid/reasonable and thanking the author for their feedback [2]. I've seen other criticisms spawn good discussions and/or a good number of people agreeing, but nothing quite as clearly on point as that off the top of my head. [0]: https://news.ycombinator.com/item?id=40172033 https://news.ycombinator.com/item?id=40172033 [1]: https://old.reddit.com/r/rust/comments/1cdqdsi/lessons_learned_after_3_years_of_fulltime_rust/ https://old.reddit.com/r/rust/comments/1cdqdsi/lessons_learn... [2]: https://old.reddit.com/r/rust/comments/1cdqdsi/lessons_learned_after_3_years_of_fulltime_rust/l1e722d/ https://old.reddit.com/r/rust/comments/1cdqdsi/lessons_learn...
- ChadNauseam 1y agoI know this post is AI generated to some extent but I'm still curious. The subtitle says: > Rust shouted about safety. Zig just built it — without the ceremony, the sermons, or the 15-minute compile times. Which I interpret as meaning that zig delivers memory safety in a simpler way than rust. But a few paragraphs in, it says: > Rust teaches you ownership like a tough-love therapist. Zig, meanwhile, just shrugs and says, "You break it, you fix it." That's the philosophical divide. Rust assumes you can't be trusted. Zig assumes you're an adult. Does this mean that zig's safety depends on trusting the programmer to write correct code? This wouldn't necessarily be a bad thing if zig makes correct code simple to write or has other advantages, but if incorrect code is allowed it makes sense why the compiler can be more permissive and I wouldn't say it's quite delivered the same thing as Rust. Ok, another thing: > Zig looks boring. Feels boring. Reads like a C project written by someone who finally went to therapy. pub fn main() void { const stdout = std.io.getStdOut().writer(); stdout.print("Hello, World!\n", .{}) catch unreachable; } > That's it. No macros. No build.rs. No Cargo screaming about outdated crates. Am I crazy or does this not actually look simpler than fn main() { println!("Hello, world!"); } Is the zig version doing something other than hello world? Or did the author, in their post about how zig is simpler and more readable than rust, choose a code example where the corresponding rust code would be much simpler and more readable?
- gabrielgio 1y agoThere is a simpler version for zig. pub fn main() !void { std.debug.print("Hello, World!\n", .{}); } The only difference is this writes to stderr and does not fail (and explicitly says it is meant for debug), while their example writes to stdout. In zig if you want to write to stdout you need to explicitly pick the std and handle all the details (like error handling). He gave the possible worst example, this article is nonsense.
- tuetuopay 1y agoZig's memory safety has nothing in common with Rust. I'd even say, it mostly has barely more than C. It gets reliability from proper error handling. It has a very weird feeling complaining about build.rs when any semi-serious Zig project comes with a build.zig that's always more complex than any build.rs.
- ravenical 1y agoYeah, this is AI. "1. Rust Promised Us Heaven. Then Gave Us Paperwork. Remember the hype? Rust was the "C killer." The messiah of memory safety. The savior of systems programming."
- yonki 1y ago>Zig, meanwhile, just shrugs and says, "You break it, you fix it."< Exactly. That’s what Rust defends us from. It makes breaking things way harder. Rust forces you to think differently, you cannot just do what you want, but that’s it’s selling point. The article focuses mainly on feelings not facts and that’s ok, but I don’t feel exhausted writing Rust. I like that it’s safe and I’m happy to sacrifice some freedom if I get safety in return. That’s a weird article. Rust wanted to be safe systems language and it is. Where’s the issue? Zig has different goals. That’s ok. What are actually discussing here?
- kugutsumen 1y agoAI generated slop...
- lenkite 1y agoI like the article's theme. Coding in Rust does indeed suck brain-power and even after 2 years of off-and-on attempts, I am still faster (and less tired) in other languages (including C++). But the LLM generated text is just deeply pissing me off, sorry. Why use snarky LLM slop here ? Use straightforward, ordinary human-developer language for this.