re: Are global variables bad? VIEW POST

re: Phrasing the whole issue from the other end, I think one could argue: It's better to restrict access to mutable data as much as possible. Otherwis...

I agree, restricting access to mutable data, in particular having a single owner who modifies the data, is a decent starting point. Of course, it also has nuances, but at least it's not as ambiguous as "global variables".

I'm not off on get_time because the question "are global variables bad?" makes no mention of mutability. It's one of those nuances, which is the point I'm trying to make. A read-only global time variable is something we agree that is okay.

code of conduct - report abuse