4 ms·
OOP is a crazy academic-esque idea that happened to stick because it works at scale. When you have hundreds of programmers working on a codebase, it's useful to
by phendrenad2 6y ago
OOP is a crazy academic-esque idea that happened to stick because it works at scale. When you have hundreds of programmers working on a codebase, it's useful to constrain people with UML diagrams and rigid hierarchy. Otherwise, cowboy coders hack up something the other 90% of coders can't understand. This is why languages like Scala and Haskell haven't taken off outside of a few small-team-focused niches, like data science.
- lou1306 6y agoIn my opinion the "killer feature" of OOP at scale, more than hierarchy, it's compartmentalization of code. Class hierarchies tend to have issues at scale, but OOP makes people agree on "where should we put this block of code" in a way that's "intuitive" and scales.
- creatonez 6y ago> OOP makes people agree on "where should we put this block of code" in a way that's "intuitive" and scales. This is the opposite conclusion of Brian Will's Object-Oriented Programming is Bad video. Since it forces you to think about everything as a real-world "object", OOP often leads to philosophical debates like Should a Message send() itself? Should a Sender send() Messages? Should a Receiver receive() Messages? Should a Connection transmit() Messages? With more and more abstract OOP constructs with more and more interaction with the rest of the program, knowing where to put the relevant code becomes more and more difficult. FizzBuzzEnterpriseEdition[1], while it is satire, is quite similar to a lot of large Java codebases that have been through the wringer of alternating cycles of OOAD and code rot. Try to find the right bit of code to edit if you wanted to add a new feature to FizzBuzzEnterpriseEdition. Not very easy. --- [1] https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...
- wvenable 6y ago> OOP is a crazy academic-esque idea that happened to stick because it works at scale. I suppose it's weird to be young enough that you're first exposure to OOP is it being taught in an academic environment. It must make it seem like it was dreamed up like some kind of formalism and spewed into your brain. But before OOP languages and everything that you describe, people using plain old procedural languages were already coding in an OOP style because it's obviously beneficial. Languages later came along to formalize patterns that people had used for years. For a more modern example you just have to look at the Linux kernel which includes a lot of OOP principles even though it's all just C.
- phendrenad2 6y agoTrue, a lot of OOP is stuff that you might develop on your own, if you were writing a lot of code back in the procedural days. But computer science has been with us since the beginning of computers, and certainly OOP as we have it today, with all of it's formalism, probably started back then in computer research institutions like MIT and Stanford.