r/learnprogramming • • 15d ago

Suggestions regarding programming

I'm 18. I'm currently learning Java and I feel I'm unable to understand stuff in it, especially object oriented programming. The practice feels like I'm falling behind.

16 Upvotes

39 comments sorted by

View all comments

Show parent comment

1

u/ConnectAffect2346 15d ago

To be honest your explanation is very well put and it gave me a bit better understanding of oop after reading - im still a student but i am trying to use oop to make projects and the explanation you gave regarding card decks is well put and it gave me a bit more hints regarding programs i made in python using classes and programs made with javascript so i want to ask if there is let's say a plan to make a program ready to be scalable in future does it still matter if i create objects which will be used in future or is there another method to it like making a program good as is without creating objects or classes?

2

u/aqua_regis 15d ago

OOP is only one of three major programming paradigms. The other two are procedural and functional.

Programs can (and have) been written in any of all three or even in combinations of all three paradigms.

This also applies to large, scalable programs.

Certain programming languages enforce certain paradigms, and others are more free.

There is no golden rule what the best paradigm is, but there are plenty, heavily opinionated discussions about this topic.

1

u/ConnectAffect2346 15d ago

Ohh okay, so it all depends on the purpose of using that paradigma or making a combination of paradigmas?

2

u/aqua_regis 15d ago

No, it does not work like that. You can use any paradigm for almost everything. Some are better, some are worse.

Sometimes the used language defines the paradigm.

Sometimes a mix of paradigms is beneficial.

1

u/ConnectAffect2346 15d ago

Ohh okay, now i understand it seems i had the wrong perspective about paradigms, thanks for clearing it up🙂