5 ms·
> Designs that spread complexity rather than encapsulate it are rarely a good idea. Exactly, globals spread complexity. You need to look at the implementation
by rileymat2 2y ago
> Designs that spread complexity rather than encapsulate it are rarely a good idea.
Exactly, globals spread complexity.
You need to look at the implementation of each function to know if you can call it. That’s the landmine.
- grandempire 2y agoI agree that dependent sequences of events, coordinated through a global are bad. But there are other usages which are not error prone. For example an allocation, logger, readonly settings, or a cache.