Hacker News new | ask | show | jobs
by everettwilson 2294 days ago
Not really anything of an expert with Rust, but I'd say that the language tries to dispatch function calls statically whenever possible, though it certainly has the capacity to provide polymorphism when needed, through the use of trait objects [0].

From using it personally, I've found that I can usually get by with generics and the static dispatch that they provide, but having the option to use trait bounds can be a real boon when you need the flexibility to call on shared pieces of functionality between separate complicated systems.

[0] https://doc.rust-lang.org/1.30.0/book/2018-edition/ch17-02-t...