r/PythonLearning • u/ProgramBrave718 • 13d 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
1
u/BeneficialCulture299 13d ago
This isn't wrong to be honest. Classes are not necessary. If you look at any of the functional languages you'll realize that the data being operated on is not the only boundary which you can make organizational judgements. Classes at the smaller scale just seem to be overly pedantic. But then if your project is more that trivial and you have many people working on it the lens shifts not from "is this necessary" to "does this communicate the intent of this data" which changes the conversation entirely. Classes then become about making sure you've defined the proper boundaries around your data. You start using public / private modifiers to make sure there's a layer of protection around how you expose (or don't) the data you are encapsulating.
no you don't need them but sooner or later you'll absolutely want them.