Hacker News new | past | comments | ask | show | jobs | submit login

OOP is absolutely not essential, that's why new languages like Rust, are not OO. OOP is not necessary for mutable state.



SEE: 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 seem to disagree with your statement.


Haskell 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.


Well, one might argue that “traditional” OOP is the best way to write GUI frontends and their lack show for Rust.


The best UIs, such as visual studio code, are now written in HTML.


Calling vsc the best design is quite something.

HTML has plenty to learn from even Windows Forms. Layouting only recently became okayish on the web.


You 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.


Qt? 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: