OOP misuse
*sigh* Why do so many #Python / #OOP programmers do this?
new ThingDoer().doThing(stuff)
The ThingDoer is really just used as an additional variable scope, so instead of having clean mostly-pure functions where it's obvious what parameters they get, everything passes data through self/this, so whoever reads the code has to do extra detective work to figure out what fields were assigned before a function call. If you are lucky, fields are mostly used as inputs and not instead of returns. Sometimes you aren't lucky.
This is also fucked up because it necessitates much laxer types. Because you can't guarantee to the type checker that a field has been initialized, you have to mark everything as nullable, so now the reader of your code has to worry about null safety too. And of course you can't mark things as const/final.
This is not a rhetorical question, I want to know where #programming #education fucked up. And this is certainly not an issue exclusive to Python, I've also seen it in #Java code, but I don't read as much Java on a daily basis.
How do we prevent this mess?