Goto

Collaborating Authors

 doubly


Things you can't do in Rust (and what to do instead) - LogRocket Blog

#artificialintelligence

As a moderator of the Rust subreddit, I regularly happen upon posts about developers' attempts to transpose their respective language paradigms to Rust, with mixed results and varying degrees of success. In this guide, I'll describe some of the issues developers encounter when transposing other language paradigms to Rust and propose some alternative solutions to help you work around Rust's limitations. Arguably the most-asked-about missing feature coming from object-oriented languages is inheritance. Why wouldn't Rust let a struct inherit from another? You could surely argue that even in the OO world, inheritance has a bad reputation and practitioners usually favor composition if they can.