3 ms·
SEE: https://doc.rust-lang.org/book/ch17-01-what-is-oo.html#:~:text=Using%20this%20definition%2C%20Rust%20is,of%20Four's%20definition%20of%20objects https://doc
by galaxyLogic 4y ago
SEE: https://doc.rust-lang.org/book/ch17-01-what-is-oo.html#:~:text=Using%20this%20definition%2C%20Rust%20is,of%20Four's%20definition%20of%20objects https://doc.rust-lang.org/book/ch17-01-what-is-oo.html#:~:te....
"Using this definition, Rust is object-oriented: structs and enums have data, and impl blocks provide methods on structs and enums. Even though structs and enums with methods aren’t called objects, they provide the same functionality, according to the Gang of Four’s definition of objects."
So the maintainers of the Rust language documentation at https://doc.rust-lang.org/book/title-page.html https://doc.rust-lang.org/book/title-page.html
seem to disagree with your statement.
- grumpyprole 4y agoHaskell also has traits (type classes) and "methods" on them, I don't think anyone would seriously claim it's object oriented. The Rust website is clearly just a piece of marketing. Most languages that are not "OO first" will likely provide alternative mechanisms to encode OO if you want it.