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

Exactly. "Everything is an object" was an extremism (today's extremism is the crusade against 'mutable state'), but otherwise OoO has been useful. For example it has seen great success in GUIs.


If you're creating final immutable everything in Java using effective Java chapter 1 immutable objects, sorry but you have the wrong language for the job. Even with Java 8 Optional and Lombok annotations, it opens a can of worms. What is optional and what are sensible defaults for non optional value? These are often non trivial questions in legacy code bases.


And yet Clojure immutable datatypes were written in Java.


I can definitely state that OOP allows to implement GUI. But "great success" I can see only for vendors selling OOP tools for GUI development.

Consider web frameworks. Given a choice I select React and similar functional frameworks than OOP based ones. They are just more productive and scale better.

Or consider QT. My colleagues with a lot of QT experience use QML to create GUI. They avoid any C++ GUI code unless it is really a must.


>Consider web frameworks. Given a choice I select React and similar functional frameworks than OOP based ones. They are just more productive and scale better.

That's because there are no decent OO based web UIs, because the web development experience and stack is a total mess to begin with.


The web UI objects, with their collection of global namespaces for IDs, Classes, JavaScript functions, etc., are aggressively resistant to compontentization.

You can see the disastrous implications of this feature with the ID mangling needed for Asp.net webforms, and the utterly miserable workflow that creates.


ASP.Net Web Controls was an attempt at bringing the desktop technologies like MFC to the web, and it was a horrible horrible idea.

The worst part is that everything else about the original ASP.Net was mostly really good ... but Web Controls completely destroyed it's reputation.


Well, I used to bash C++ and OOP programming till not a long time ago, but I am slowly reconsidering my ideas.

I am now learning Rust, and for this purpose I am trying to implement a small TUI (Text User Interface) framework. In order to get some ideas, I dug in my library and found the Turbo Vision User's Manual that was bundled with Borland Pascal 7.0 [1]. Reading it after so many years made me wonder how could they create such a complex and well-thought framework that was truly usable for your own stuff, given the technology and knowledge available 30 years ago. The text often underlines that a lot of features were possible thanks to the OOP constructs implemented in Turbo Pascal, and I believe them. I think that OOP importance might have faded today, but its historical significance for the development of GUIs and TUIs should not be underestimated.

P.S. I am trying to implement my library in Rust, which is not an OOP language, and so far have found no blocking point: traits and containers are more than adequate replacements for the kind of polymorphism and inheritance used in libraries like Turbo Vision. But my point still stands: once we learned that polymorphism and inheritance were useful to solve some specific problems, we have derived better ways to achieve the same purpose.

[1] https://archive.org/details/bitsavers_borlandTurrogrammingGu...


Ex-Turbo Vision user here .. I continue to be disappointed by modern GUI technologies, by comparison. Every time I pick up some React tutorial, it makes me sad as hell that we've come so far, and yet have to deal with such errant crap as React and the Web itself as a whole.

Its gotten so bad that I feel strongly about killing the browser-based ideology and just returning to native clients for everything .. I mean, its really not an easy decision to "do the whole GUI in Web", even though by now it should be. It just seems like such a mess by comparison with where we should be by now, given the work done decades ago ..


React itself does much less then what component oriented oop frameworks used to do. Achieving same functionality with react is more work. They were not on the Web tho, so the comparison is a bit weird.


"achieving same functionality is more work" this is part of the advantage of react (and fp in general over oo). you don't need to incorporate an entire object to use a single extra function. The increased modularity also allows you to spread the maintenance burden of the project over a much larger community.




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

Search: