4 ms·
OOP is absolutely not essential, that's why new languages like Rust, are not OO. OOP is not necessary for mutable state.
by grumpyprole 4y ago
OOP is absolutely not essential, that's why new languages like Rust, are not OO. OOP is not necessary for mutable state.
- galaxyLogic 4y agoSEE: 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.
- kaba0 4y agoWell, one might argue that “traditional” OOP is the best way to write GUI frontends and their lack show for Rust.
- grumpyprole 4y agoThe best UIs, such as visual studio code, are now written in HTML.
- kaba0 4y agoCalling vsc the best design is quite something. HTML has plenty to learn from even Windows Forms. Layouting only recently became okayish on the web.
- grumpyprole 4y agoYou think the likes of GTK and Qt give a better UI than VS Code? I'll tell you why there are no mature bindings in Rust for these toolkits and it has nothing to do with OOP. It's because there's no demand for it.
- kaba0 4y agoQt? Definitely. But I have also seen very great gtk apps. Electron apps always feel “non-native” and laggish. Honestly, try out the telegram qt app, it is lightning fast compared to any electron app.