upvote
Whether or not it's "essential" is kind of irrelevant for the ergonomics; Languages do exist that provide only closures. (And yes, the likes of Java do struggle a bit with function pointer ffi) Similarly, "we need this because low level" has never made C++ more tolerable.

The thing about rust is that it's complexity is self-contained and follows established rules. If one understands data ownership, one only needs to be told what a closure is for all these edge cases and problems to make sense.

Contrast the complexities of JavaScript, many of which still boil down to "Some doofus 30 years ago didn't do any homework and made bad design decisions for type coercion". Just "fuck you, go memorize these behaviours".

reply
> Whether or not it's "essential" is kind of irrelevant for the ergonomics;

The thing about essential complexity is you always pay for it. Either during compile or execution. Java has concept of thread safe but doesn't track it via types. You still need to take it into account when working with it.

reply
Nah, lots of higher level languages interface with C.
reply
by dynamically allocating FFI trampolines, which add their own performance and lifetime issues that would be unacceptable for Rust.
reply