Hacker News new | past | comments | ask | show | jobs | submit login

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.



I 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.


"sometimes" is doing a lot of heavy lifting here.


Sometimes life hands you lemons, and sometimes it hands you Box<dyn Fruit>.


This article is about curiosity, not best practices.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: