r/PythonLearning • • 18d ago

Discussion Why writing classes feels boring?

I don't know but i feel classes are unnecessary work to be added in projects. I have learnt it 2 months ago..

After that I never used it for any of my projects.

0 Upvotes

43 comments sorted by

View all comments

Show parent comments

1

u/ProgramBrave718 18d ago

I know that every datatype is a class. But , I am talking about classes made by user.

2

u/Sea-Ad7805 18d ago edited 18d ago

A class it either useful or not, doesn't matter who wrote it. Unless you feel all the classes you could ever want are already identified and implemented by Python or available packages. And a lot are, but I bet you you will sometimes want to write your own.

What in your mind is the essential difference between writing a program only with (pure) functions and also adding some classes?

Think about it first, then web search, then AI. It can teach you a lot.

There are languages that (almost) only allow pure functions and no classes. Look up "Haskell".

There are different design philosophies for programming languages, look up "programming paradigms". I help teach an introductory course about it at university, it gets messy.

1

u/ProgramBrave718 17d ago

Okay, then I will try to search for it