8 points · by wheelerof4te · 4y ago · 2 comments
Do you use dataclasses, or keep everything as close to functional as you can? I don't find Python's object oriented style pythonic, and would prefer more C-like program structure.
How can I efficiently and cleanly manage state in Python? Please share your solutions.
I suggest you focus on making the program work, before considering how to best manage state. Readability and performance can be improved through refactoring later.
I was just trying out something in a game, and minimizing mutable state has lead to some interesting ideas. Not to mention that it trivilized creation of custom data types.