How did oop fall out of favor and bow down to programming language

in #stach7 years ago

I wish. But you have to understand that software development fads run in circles. Every say 10 to 15 years, the sum total of all the idiotic technical debt wracked up by mindless developers becomes so overwhelming that people scramble for something, anything, to blame (other than themselves).

image

Then it becomes: “Why OOP MVC and Patterns, and not my illiterate programming, are the problem: so use Lisp, Javascript, Haskell, Clojure and create pure functions with no side effects.”

Then it will be: “Why functional programming and programming without side-effects, and not my illiterate programming, is the problem, so use OOP, MVC and Gang of Four patterns!”

And round and round it goes.

OOP has it’s place. It’s almost never where it is used. For instance, the web. How OOP got into the web beggars a better man than me to comprehend it. The whole point of OOP was for building complex stateful objects for simulation. So OOP is great for Air traffic Control Software, but is mind numbingly stupid for a stateless transactional medium like HTTP. (Quaintly, to “fix the glitch” HTTP 2 will be stateful with long lived bidirectional tcp connections! LMFAO).

Now that people are having to pay for processing power in the cloud, they suddenly realize that there is no such thing as free cycles, so all that object build up and tear down, all those inheritance hierarchies, and implementing object attributes with MethodMissing and Exception bubbling (face->palm()) are costing them pennies, hence the scramble to find an alternative.

Really, I was talking to a developer the other day who was implementing an interpreter in python who had cleverly re-invented the standard switch statement with functions that throw exceptions to escape a control path. Apparently, that’s a legitimate pattern. I kid you not.

Functional Programming Troglodytes are quick to rush in with “The Answer(TM)” hoping nobody remembers why we started using other programming paradigms in the first place, with promises of easily testable pure functions and so on. All bow down and worship the Lambda for blessed be thy Recursion! Praise be to the Heavenly Continuation.

It’s all about the right tool for the right job. Some things (rarely) need OOP. Somethings are better in a functional style (actually, most web stuff, event driven architectures and transactional functionality like database transactions, spam filtering and so on).

The funniest thing I’ve seen so far is TypeScript: Putting the Java back in Javascript!

Sort:  

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://www.quora.com/How-did-OOP-suddenly-fall-out-of-favor-and-bow-down-to-functional-programming