You forgot that beauty - “undefined behavior”!
Memory-safety can guarantee only so much safety! C++ can still blow up in your face, even with all the alleged memory-safety built into C++, thanks to all the UB traps in C and C++.
Rust is the closest language that has no such “gotchas”.
C++ with -Wall -Werror, and no pointer diddling.
C# is good too. If you havent heard of lobster you should look into it.
Rust
With no context, this could be an honest attempt to learn about different tools, a thinly veiled set-up to promote a specific language, or an attempt to stir up drama. I can’t tell which.
It’s curious how such specific conditions are embedded into the question with no explanation of why, yet “memory safe” is included among them without specifying what kind of memory safety.
The question mine as well be “what is your favorite compiled language?”. There is a lot of overlap between the possible answers.
As others have said, Haskell and Rust are pretty great. A language that hasn’t been mentioned that I REALLY want to catch on, though, is Unison.
Scala 3 native. If the compiler was faster I’d be even happier. Curious to try Ada
<?php declare(strict_types=1)
😏 😁
🏃♂️💨
🦀
Rust and Haskell (I think Haskell counts)
Python with MyPy.
(Almost any language can meet those criteria, with enough shenanigans.)
But that’s not compiled, not to binary at least.
Rust.
Hands down, Rust 🦀
Swift