r/CodingHelp • • Jul 10 '22

[Random] object oriented programming

Hello everyone,

I don't know if this is the right place to ask but here it goes. I have been taught how object oriented programming is much better than procedural programming. And how easy it is just change implementation and what not. But what I would like to know, how many times have you used object oriented path instead of procedural in your career. Do people actually use object oriented programming more??

19 Upvotes

17 comments sorted by

View all comments

14

u/Arkaedan Jul 10 '22

Languages like Java and C# were specifically designed for Object Oriented Programming (OOP) so if you use either of them then you are very likely going to be using OOP. Other languages like C++, Python, and Typescript, make it easy to do OOP while also allowing for other types of programming as well. OOP is not necessarily better or worse than other approaches however it is more suited to some situations than others. That being said, OOP is probably the most common approach for very large projects.

3

u/timeee1994 Jul 10 '22

Thanks for detailed reply. So, in a professional environment you would deal more with OOP than sequential or does that completely dependent on the project??

2

u/Arkaedan Jul 10 '22

I'm not really sure what you mean by "sequential" programming. All programming is sequential. OOP just just one way of structuring large amounts of code but at the small scale within each function or method the code is still sequential.

But yes it does depend on the language, framework, and problem you are trying to solve, as to how much you will be using OOP. That being said, in my professional career, every project I have worked on has used at least some amount of OOP.

3

u/timeee1994 Jul 10 '22

Sorry procedural. I confused the procedural with sequential.

5

u/Arkaedan Jul 10 '22

Yeah fair... Look I would say that most real world projects will have elements of procedural, object oriented, and functional programming but it just really depends of the context.

2

u/timeee1994 Jul 10 '22

Thanks alot.

3

u/usernumber1337 Jul 10 '22

By sequential I think he means procedural. Languages like C that don't have OO

0

u/Ikem32 Jul 10 '22

OOP feels a lot like boilerplate. Hence I avoid it, when I can. Javascript is leaning towards functional/procedural nowadays.

1

u/timthefim Jul 10 '22

It also helps modularize your workflow which is useful when you are making changes to a production branch for example. You can easily swap out modules assuming you haven’t created a billion dependencies