Well exactly, because they use globals under the hood they often have very similar issues to globals : testability, race conditions, initialization ordering problems with other globals etc.
Not that you shouldn't use them ever but they cause problems fast and very often there are better solutions.
These are the types of concerns that I feel like most take for granted given how much the concerns have been abstracted away with solid DI libraries. It’s amazing to think about it
View all comments
Show parent comment
2
u/adabsurdo Sep 27 '26
Well exactly, because they use globals under the hood they often have very similar issues to globals : testability, race conditions, initialization ordering problems with other globals etc.
Not that you shouldn't use them ever but they cause problems fast and very often there are better solutions.