4 ms·
Any time I come across (or review) code which uses globals, even at the module level, they invariably make it hard to mock the related code in tests. Dependency
by nothrabannosir 8y ago
Any time I come across (or review) code which uses globals, even at the module level, they invariably make it hard to mock the related code in tests. Dependency injection and class (/instance) level state are an improvement pretty much always.