3 ms·
use of a global variable seems pretty stupid in fact, and easy to spot
by bagacrap 5y ago
use of a global variable seems pretty stupid in fact, and easy to spot
- useerup 5y ago> and easy to spot Not always. Like if you initialize middleware by using a "lambda" (closure), and you from within that closure creates a new closure. It means that you need to be aware of the context the outer closure is used in. If it is only instantiated once during initialization, it's free variables are in essence "hidden" global variables. Not easy to spot.