4 ms·
The evolution of OOP gives me fond memories. I feel very lucky (in many ways) that I started with VB5 and Turbo C/Pascal. Sure, you can do OOP in VB6 but the b
by masfoobar 2y ago
The evolution of OOP gives me fond memories.
I feel very lucky (in many ways) that I started with VB5 and Turbo C/Pascal. Sure, you can do OOP in VB6 but the books I read did not touch this area.
Then I tried Java. I hated it! This would have been around 1998.
The Java books I was reading were huge and half of it was not entirely about Java the language.. but OOP concepts. Some of it was inheritence hell! I remember looking at code that was just a bloat.. when in C it could be a couple of structs and 10 functions.
Then "Design Patterns" was thrown around in Job adverts. I had to bite the bullet and learn it to get my foot in the door. I was 18 at the time.
Once I got my foot in the door and gained the experience needed to get good as a developer, you soon get a handle of what works and what doesn't. Am I suggesting OOP is bad? No.. it has its place. I found the GoF is not as serious as it is pushed.
It was not long before I went full circle, coding more away from typical OOP mindset. I felt like the odd one out when I tried to explain this to co-workers but once we reached 2010's with the coined "Data Oriented Design" I realised my mindset is shared by many.
Personally -- and.. yes.. this is controversial.. I think OOP set us back 10 years of programming progress. Not because of OOP itself, but how large companies jumped on the bandwagon and encouraged developers that "this is the right direection" so much effort was there, creating large.. bloated.. monolothic code.
I felt like Dlang was an interesting step forward but, sadly, it is a language that tries to be everything. Now with Rust, Zig and Odin, I do believe that OOP will slowly lose in popularity but it will be a very, very slow decline.
- freilanzer 2y agoThese so-called 'patterns' are just language features in many languages, which makes it sad I had to learn them in university. Optional/default parameters, higher order functions, closures, ... The 'patterns' only make sense in Java because the language itself is so limited.
- kstrauser 2y agoI’m so glad to hear others putting words to my own thoughts. I haven’t read all of Design Patterns because it kept striking me as wholly unnecessary in the languages (mainly Python) I was using at the time. I mean, if you want to put name on every kind of chunk of code you can write, go for it. I’m not going to argue about whether calling a function on each item of a list is better or worse than passing that list to the function based on which one is a documented pattern, or debate which pattern to use to make an HTTP GET request. I’d much rather just write the things. I’m sure lots of people got value from the book. I pity that they were in a situation where it was useful.
- zelphirkalt 2y agoGood example for this also: Python decorators.
- masfoobar 2y ago> The 'patterns' only make sense in Java because the language itself is so limited. I will always remember the first pattern I learned -- the Decorator Pattern. From memory, the example used was making hot beverage.. adding milk, sugar, etc. I looked at the code and said "So its a Link List of items?" I understand the book was covering things in a simple manner but even this looked like bloat, with things like Milk, Sugar, etc.. being its own class (inheriting the decorator) that, in the end, is simply a enum with a couple of structs if using a language like C. I just felt it we are adding +30 lines of code for this SIMPLE example -- how much bloat would it be for real world solutions?