logoalt Hacker News

hoppptoday at 4:56 PM2 repliesview on HN

The thing with rust is that you get safety with slow compilation, it's a tradeoff.

Zig doesn't have the same safety guarantees, it's on the dev to use safe coding patterns, so the tradeoff for safety is discipline or experience.


Replies

steveklabniktoday at 4:56 PM

Rust's safety checks have basically nothing to do with its slow compile times. This is something that sounds intuitive but is just completely incorrect.

In particular, Rust made several good design decisions around this stuff that keeps those checks fast, like keeping checks local rather than being global.

show 1 reply
stock_toastertoday at 6:20 PM

(tongue in cheek) It seems recent history has shown that zig can get you to working software faster, then you can port it to rust once you are acquired or find market fit?

Maybe at some point in the future zig could add a rust compilation target ( like with `-ofmt=c` )...

show 2 replies