Rust is famous for strictness in terms of memory management and error handling. But there is also a not very well known and to my mind a bit of a unnecessary stiffness in the type system when talking about trait specialization. Here is a minimal example, you don't not need to be an expert in Rust to understand it.
Basically rust compiler assumes that in the future there might be a type that implements both A and B and therefore this will create a conflict. To my mind this is not needed as this can be intentional design that the traits A and B are not planned to be implemented at the same time.
Basically rust compiler assumes that in the future there might be a type that implements both A and B and therefore this will create a conflict. To my mind this is not needed as this can be intentional design that the traits A and B are not planned to be implemented at the same time.
play.rust-lang.org
Rust Playground
A browser interface to the Rust compiler to experiment with the language
Currently this can be solved by wrapper type pattern and boxing. But surely this is not very elegant. Hopefully language design team will fix it with specialization, though it is still uncertain when this feature is planned to be released.
doc.rust-lang.org
Box in std::boxed - Rust
A pointer type that uniquely owns a heap allocation of type `T`.
Good Design sounds a bit too generic and sometimes people overuse this term as an argument to bring in unnecessary complexity, but I agree with the other points https://twitter.com/graninas/status/1380451255764537345
Twitter
Alexander Granin
Truths I've Learned The Hard Way Good Design > Performance Getting Things Done > Perfection Tests > Automatic Correctness Simplicity > Math beauty People > Technologies Experiment > Belief
Wow someone actually believes Java is underrated. Well then I guess if it was properly rated 100% devices would be running Java?😅
Twitter
Jenny Codes 🏴
Java is underrated.
fasterthanlime articles are always fun to read https://fasterthanli.me/articles/so-you-want-to-live-reload-rust
