3 ms·
I would be shocked if they write more Zig than Rust. Likewise if they find more references and docs in Zig. A lot of zig code in the wild doesn’t even compile a
by the_mitsuhiko 4y ago
I would be shocked if they write more Zig than Rust. Likewise if they find more references and docs in Zig. A lot of zig code in the wild doesn’t even compile any more.
- pron 4y agoI wouldn't use either Zig or Rust in production just yet, but if you're someone willing to take that risk, then picking a language that is so easy to learn (learning Zig from scratch only takes a couple of days) is certainly an advantage especially if you're not using it much. There are definitely other factors against it, but I can easily see why this would be a very important one in its favour.
- the_mitsuhiko 4y agoThere is a massive difference in language stability, compiler stability and ecosystem maturity between Rust and zig. You can use Rust in production for multiple years and many companies do. The same can’t be said about zig.
- pron 4y agoCertainly, but on those metrics the two languages -- that are neither the only nor the frontrunner choices -- are closer to each other than either one is to the actually established, popular options that have a massive (positive) difference compared to both. So, if among the alternatives you are willing to consider either Rust or Zig to begin with, then popularity, maturity, clear prospects, and low long-term risk are clearly not your biggest factors and your choice will be based on other things that matter to you more. These factors do matter a lot to me, which is why I, like the vast majority of low-level shops, wouldn't pick either one of these languages for production use at the moment (if top speed were a crucial factor for me in picking a car, I wouldn't care by how much the second-to-last car beat the last car in a race, as I'd pick one from the leading pack), but the poster clearly has other considerations that should be judged based on the poster's values, not mine.
- the_mitsuhiko 4y ago> So, if among the alternatives you are willing to pick Rust or Zig to begin with, then popularity, maturity, clear prospects, and low long-term risk are clearly not your biggest factors and your choice will be based on other things that matter to you more. Quite frankly I don't see a place where the choice _today_ is between Zig and Rust. Rust is an established language, Zig is not. I replied to a comment that literally said "we don't really write that much in Rust so going back after a break is a PITA" and my comment should be read in that context. If you are not constantly going to keep your Zig code alive it's going to break just with the changes in compiler and language. Zig is a non stable language (and evidently does not try to be stable) and is notorious for miscompilations. > but the poster clearly has other considerations that should be judged based on the poster's values, not mine The person I replied to left two comments here. I would not interpret too much into that.