Elliot Suzdalnitski
1 min readJul 28, 2019

--

I don’t mean to be rude, but how exactly is OOP better than using plain functions? OOP code is non-deterministic, while functions (if they are pure) are always deterministic.

> Spaghetti code arises when there are too many things interconnected with each other.

That’s exactly what OOP is — a graph of interconnected mutable objects, all shared by reference… Basically a glorified blob of global state. I’m not sure how exactly that solves the problem of spaghetti code…

> As the code base grows, you’re going to need to change the way you arrange your thoughts and start thinking in terms of objects.

I hope I won’t ever have to be thinking in terms of objects anymore, the damage caused by a decade of working OOP can’t be undone, unfortunately.

> The issue with functions based programming is that a break in chain can result in the failure of the entire flow.

What exactly is a break in chain? Pure functions should not throw exceptions, therefore the chain of function calls can’t be broken… I’m not entirely sure what you mean though.

> spaghetti like relationships that is inherent in functions based programming

I’m not sure what you mean by that, there’s no such term as “functions based programming. Do you mean procedural programming? If that is the case, then maybe update the article to prevent causing any confusion in newbies…

--

--

No responses yet