4 ms·
This is not pg’s best. OOP was invented in academia as a way to scale software design by defining abstractions that you still keep in your head even after it be
by sytelus 8y ago
This is not pg’s best. OOP was invented in academia as a way to scale software design by defining abstractions that you still keep in your head even after it becomes very large. You don’t need OOP to write hello world like many languages such as C# and Java enforces. To pg’s point that hello world becomes quite ugly and verbose. On the other hand I have known C programmers writing million LOC and bragging about never needing OOP features of C++. When I look in to their code I often find that they had just reinvented OOP in their own home brewed way in rather less deciplined and mediocre manner. But still they would consider themselves to be too smart to need OOP.
- pdimitar 8y ago> But still they would consider themselves to be too smart to need OOP. Please note that I fully agree with this part; I've met such programmers and then actively avoided them. But there's always the other side of the coin. You can reinvent your own mini-OOP for a specific scenario you need (recent example: utilize different data parsers depending on a HTTP response header and a top-level XML attribute in the response). And you can make sure you don't suffer from some of the OOP's undeniable problems -- like "brittle superclass". Ever since I worked with Elixir I had to do something like the above 5 times in total and was VERY happy with my own half-arsed OOP implementation because it allowed me to keep a strict control of things while still giving me the flexibility I wanted for the particular task at hand.