Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

... most self-respecting developers have got rid of mutable global variables in their code long ago.

I'm not convinced that's the case. Almost everyone has merely hidden their mutable globals under layers of abstractions. Things like "singletons", "factories", "controllers", "service objects", "dependency injection" are the vernacular of the masked-globals game.



None of those things you said imply mutability. (Okay, maybe singletons, depending on the implementation.)


True, but in practice they tend to be used as containers or initializers for mutable variables.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: