r/programming • • Sep 26 '22

Fundamentals of object-oriented programming (OOP)

https://medium.com/@dcortes.net/fundamentals-of-object-oriented-programming-oop-3b68dcc2d179
0 Upvotes

7 comments sorted by

1

u/belovedeagle Sep 26 '22

Teaching OOP in 2022 is positively criminal. Programmers taught too long in OOP are uniformly the most damaged, least capable programmers I've ever mentored. But it's not their fault when charlatans continue to peddle cutting-edge 1990s(and earlier) ideas which have been debunked and discredited nearly from the day they were introduced, if not before.

4

u/[deleted] Sep 26 '22

No. OOP has its place. Functional has its place. Imperative has its place.

Also please note that OOP and functional are orthogonal, and you can have both.

Want to see an example of a library that is awesome at combining OOP and functional programming? Look no further than RXJS. You will see great examples of interface inheritance, implementation inheritance, functional composition, and so on.

Going pure with any paradigm has a lot of downsides:for example going pure functional will give you performance problems due to too many allocations. Going pure OOP gives you Java-like bullshit. Going pure imperative is not really maintanable and so on.

The best course or action is to combine all paradigms.

1

u/AdministrationWaste7 Sep 26 '22

theres nothing wrong with teaching OOP.

the issue is that programming "rules" and frameworks are just guidelines. many people don't seem to get this so they spend their time trying to follow some rule(without really understanding why it exists) and you come out with a mess.

1

u/regardedchimp Sep 27 '22

I just love implementing oop on css!

0

u/[deleted] Sep 26 '22

[deleted]

1

u/dcortesnet123 Sep 26 '22

Thanks for the comment, it helps me grow. I will change the concepts. have a nice day.

0

u/AdministrationWaste7 Sep 26 '22

the problem with OOP is that people do it just for the sake of it.

instead of breaking down classes into smaller classes or using inheritance when you need to or using some design pattern when a specific problem presents itself people just start from the get go.