Hacker News new | ask | show | jobs
by nodejs_rulez_1 1688 days ago
I love typeful functional programming, but:

> There’s no objective and open evidence that OOP is better than plain procedural programming.

None such evidence for functional vs anything either.

> Some might disagree with me, but the truth is that modern Java/C# OOP has never been properly designed.

Really?

> It never came out of a proper research institution (in contrast with Haskell/FP).

Not designed 'by a committee' effectively? I guess there is a new definition for languages designed by "research institution": a language that nobody uses to ship things.

> Erlang is OOP in its purest form.

Erlang is a domain-specific language for backends. It's useless for front-end.

> Contrast this to a similar refactor of non-OOP code in JavaScript:

A language not made by a research institution, that had to have a bunch of higher-level languages created on top by non-'research institutions' to make it more usable (aka OOP)...

> Refactoring OOP code is extremely risky. Complex dependency graphs and state scattered all over OOP codebase, make it impossible for the human brain to consider all of the potential issues.

And you have picked JavaScript as a counter-example :)? Like, is there a single competent person on Earth who would pick refactoring a legacy JavaScript codebase over a legacy C# codebase? The types alone would be a game changer, not to mention ReSharper.

> The development of functional languages is mostly community-driven.

So, not by 'research institution's?

> I expect some sort of reaction from the defenders of OOP. They will say that this article is full of inaccuracies. Some might even start calling names. They might even call me a “junior” developer with no real-world OOP experience. Some might say that my assumptions are erroneous, and examples are useless. Whatever.

O_O

> However, their arguments in the defense of OOP are usually quite weak. It is ironic that most of them probably have never really programmed in a true functional language.

Pre-deflecting personal attacks followed by a personal attack?

...etc. Too much to unpack there frankly. On a serious note, functional programming saved me a lot of stress in many situations. OOP done well is quite beautiful, and yes, closer to Alan Kay's original vision than modern Java.

1 comments

Regardless of everything else I'm afraid that job-market-wise OOP is dominating which makes it difficult (at least for me) to do serious knowledge investment in FP.

OOP related I've seen it used nicely -usually when kept as simple as possible and mostly as a message passing mechanism. But more often than not it ends up as a big ball of mud or an overengineered mess of design patterns and opinionated (to the point of cargo-culting) principles (SOLID etc). Specially from younger devs.