Just read a bunch of posts on traits/trait objects in Rust and it is not clear when to use static vs dynamic dispatch. Anyone have a one sentence tl;dr on when to use which?
@rustlang
-
-
“Failure” is harsh, but I mean that if compilation time drives users to less performant code, the fault is with the compiler, ultimately. It’s gotten much faster in even the last year and I’m happy with the rustlang team greatly
-
Monomophization will never be free, no matter how fast your compiler is. It results in fatter binaries and other negative things. The beauty of trade offs is that sometimes we don't care about the downsides. Like using dynamic dispatch in code that isn't a performance bottleneck.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.