Live data from Hacker News

The faster you unlearn OOP, the better for you and your software

dpc.pw

251–252 of 252 posts

Re: The faster you unlearn OOP, the better for you and your software

#251
post #250

Earlier quoted context omitted.

> You're encouraged to keep state only in top-level components Doesn't state grow unmanageably large for complex GUIs? > React is definitely much more functional than other/older approaches to GUIs I'm not sure about that. Take a look, both projects are much older: https://github.com/dotnet/reactive https://reactiveui.net/

> Doesn't state grow unmanageably large for complex GUIs? Yes, and there are various ways to make this less of a problem. Still, React generally favors explicitly passing props down the component hierarchy, keeping the actual UI bits pure functions and composing them in various ways that is typical of FP. > I'm not sure about that. Take a look, both projects are much older: https://github.com/dotnet/reactive https://…

> it's an example of how FP-style UI libraries can be a good solution

On the lower level, FP approach indeed sometimes causes much cleaner architecture, even for GUI code.

My point is, there’s no good alternatives at higher levels, where you want to build complex systems by combining components developed by different people/companies.

> and even be popular because they're less OO in nature.

That’s debatable. I don’t think the main reasons why React is popular are technical ones. Facebook is popular, and half year ago it’s market cap exceeded $600B. It’s $392B now but still it’s a huge company with 2.2B monthly active users. Many people want to achieve such success and view their technology as a silver bullet.

P.S. I’d like to add that OOP and FP are almost completely orthogonal. Here’s a good article about OOP in FP languages: https://medium.com/@gaperton/let-me-start-from-the-less-obvi... And many traditionally OOP languages adopted a lot of FP stuff: C#, JS, to lesser extent even C++ have now a lot to offer for functional-style programming.

Re: The faster you unlearn OOP, the better for you and your software

#252

Earlier quoted context omitted.

> Complains about logical fallacies > Immediately comments with logical fallacy.

While this is obviously wrong, it does serve to illustratea point: when dealing with controversial subjects, there is a tendency towards tribalism. When you're for one "side", the other side is by definition wrong, and you must defend your "side" at all costs. Any criticism of any aspect of your side is an attack against the tribe and by extension, you. An attack requires a counterattack, and since at this point the…

Did you mean to reply to me with this comment? It has nothing to do with what I said.
Post reply on HN