3 ms·
Rust does static dispatch even for non-free functions. Only trait objects are dynamically dispatched, and most people argue they’re under-used in Rust, not over
by steveklabnik 1y ago
Rust does static dispatch even for non-free functions. Only trait objects are dynamically dispatched, and most people argue they’re under-used in Rust, not overused.
If that does become a problem, there are also techniques like https://github.com/rust-lang/rust/issues/68262 https://github.com/rust-lang/rust/issues/68262 too.