top | item 41200330

(no title)

niederman | 1 year ago

> Remember that great feature of Rust being memory safe? It comes at the cost of not being able to easily “inject” something that implements a trait.

This is not at all the reason. The real reason is that Rust chooses to make the runtime overhead required for dynamic typing and heap allocation explicit, not anything to do with memory safety.

discuss

order

kaba0|1 year ago

Well, java won’t have any overhead in many cases (e.g. only single implementation), as the JIT compiler will do its job.