4 ms·
Interesting article, but I think the key to writing idiomatic Rust is not to stretch what the type system can do but rather be happy at what It can express and
by willeh 5y ago
Interesting article, but I think the key to writing idiomatic Rust is not to stretch what the type system can do but rather be happy at what It can express and avoid unnecessary abstraction. The compile-time guarantees that we have to prove in Rust, also serve to give a hint for when not to abstract.
- nine_k 5y agoI think pushing the boundaries of what is idiomatic can sometimes be valuable. Look how much idiomatic C++ has changed since 1995. Or what is idiomatic in JavaScript now.
- fnord123 5y ago"sometimes" is doing a lot of heavy lifting here.
- klyrs 5y agoThis article is about curiosity, not best practices.
- marshray 5y agoSometimes life hands you lemons, and sometimes it hands you Box<dyn Fruit>.