|
|
|
|
|
by oblvious-earth
999 days ago
|
|
> I don't think globals are so awful for certain things. I prefer a more functional approach where you have simple composable standalone functions instead of classes. Obviously classes have a role, but I find they sometimes overly complicate things and make the logic harder to follow and debug. But "globals" and "composable standalone functions" are contradictory, if you're mutating global state your function is neither composable nor standalone. What you've got is a poor mans class instance using global instead of self. |
|