3 ms·
Traits do not make Rust more powerful than your average scripting language. They are much less powerful. The biggest hole here is the complete absence of any d
by millstone 6y ago
Traits do not make Rust more powerful than your average scripting language. They are much less powerful.
The biggest hole here is the complete absence of any dynamicism. Rust types do not have any real runtime presence.
Concretely, there is no way to dynamically check whether this value implements some Trait. This is used in Golang (Copy -> WriterTo) but is impossible in Rust without manual implementation.