Though, if you need hard real time, even C can be tricky.
Haskell can be written for soft real time things, but it's also tricky. Rust might be a better bet?