Rust was the first language that made it efficient, abstraction without overhead (which took many years of work). It’s just a state machine with an enum holding the state, but of course it means that the memory model is harder to understand than with JavScript.