3 ms·
Rust is clearly not object-oriented. It has very minimal support for late binding, and no support for reflection or dynamic libraries. This isn't a critique, i
by millstone 8y ago
Rust is clearly not object-oriented. It has very minimal support for late binding, and no support for reflection or dynamic libraries.
This isn't a critique, it's just a statement of fact. No Rust designer will say they set out to build a new object-oriented language.
- giornogiovanna 8y agoLate binding is the only one of those features commonly associated with object-orientation, and Rust is just as good as C++ on that front.
- shmerl 8y agoC++ has no reflection either. Are you saying it's not object oriented? Rust has late binding (also known as dynamic dispatch). Check trait objects. It's not really any worse than C++ virtual functions which is its form of dynamic dispatch. See https://doc.rust-lang.org/book/ch17-02-trait-objects.html https://doc.rust-lang.org/book/ch17-02-trait-objects.html And Rust has dynamic linking as well: https://doc.rust-lang.org/reference/linkage.html https://doc.rust-lang.org/reference/linkage.html So IMHO Rust has enough features to be used in object oriented fashion.
- oconnor663 8y ago> no support for reflection Rust does have some support for reflection, though it is quite limited. https://doc.rust-lang.org/std/any https://doc.rust-lang.org/std/any
- steveklabnik 8y agoYou can do compile-time reflection, which is very popular.