Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Now I see how before Rust I was often writing my code in a typical OOP-way: forming complicated graphs, with many objects referencing each other, with unclear relationships. The class APIs, inheritance hierarchies, were there, but they were just obstructing the core problem: structuring and manipulating data... Rust will force you to be a good programmer, you like it or not.

Rust today demands static knowledge of all relationships. But class APIs, inheritance hierarchies, and the like are powerful tools for dealing with dynamic relationships: code that runs together yet evolves separately, where Rust is feeble. Good programmers recognize that different problems require different solutions!



Rust is feeble at patterns it wasn't made for (OOP), absolutely. :). Composition over inheritance.




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

Search: