loading...

OOP vs FP

aka_dude profile image Andrew Andersen Updated on ・1 min read

Today I opened Medium and found this article in "Your Daily Read". I read it and, well, I got angry that Medium recommended it to me. I found it completely unreasoned. I thought this post is one of "if you want hype, just write any article about popular theme". That's why I wrote this comment. Later author banned me :)

I wanted discussion. Please explain me where I am wrong and why it is not possible to write good OOP code.

Discussion

markdown guide
 

The ideology behind OOP is to create a code that must be reusable and clear. So, it is possible to create a huge project on OOP without messing with the code. OOP is 100% aimed to create a code that it's easy to maintenance.

Instead, FP is focused to create short code. OOP code tends to be verbose in comparison with FP but it sacrifices the clarity of the code.

 

I read author is "Full stack programmer....", which tells me it is one man army kind of developer, FP is great for one man army kind, but if you want to build a large project with many teams and many developers, you are forced to document, make patterns in FP, and finally bring (OOPS) into FP.

Code is always functional, organization of code is object oriented !!

 

Nowadays I do and prefer (simplified) functional programming. But in my estimation it is certainly well possible to write good OOP code. Big picture, the tools used play only a tiny role in the success of any product, so use whatever your team enjoys. (The business factors are the reason a product lives or dies.)

 

Thank you. I'm not really active on the web (as it said, I'm mostly in read-only mode), so when I got banned, first thing came to my mind was "What I did wrong?". Your comment does sounds cold-minded, I will read your Quora answer

 

The whole thing is wrong on both sides,
is possible to have OOP and FP if the programming language supports it,
if the most hipster langs dont support it, that wont change the fact that is doable.

 

I also got angry, so... I have to admit: I deserved it)