Rust works this way, yes. There are escape hatches though, which allow interior mutability.