3 ms·
When I started using python I wondered why classes were not so prevalent. I was just coming out of several years of C# (I had scaled the MVVM WPF mountain. Inte
by nstart 11y ago
When I started using python I wondered why classes were not so prevalent. I was just coming out of several years of C# (I had scaled the MVVM WPF mountain. Interfaces everywhere). Since then I realize that I rarely use classes except to store a basic model. And then, unless there's logic around how to convert a value from one thing to another (full name by combining first name and last name as a simple example) I've started moving things like validation and non basic business logic into their own modules. This makes using it across systems easier and allows me to scale the complexities better. Almost no OOP used basically. This has been pretty liberating as far as development and testing goes.
(Of course in 2 years I'll understand the cons of this approach and will think back on these times and wonder how I could have been so naive. :D )