If you're going all the way down that route, you might use something like Ada or OCaml or Haskell. They can catch classes of errors at compile time that Rust does not cover.
I agree. I was writing a task runner, and when I used generative AI to write Haskell code, it tended to produce higher-quality code compared to other languages. In particular, I’ve rarely encountered runtime errors when testing the code.
On the other hand, when it came to design, there were errors where my intentions weren’t conveyed properly.