DEV Community

Discussion on: I use static by default... But should I?

 
winstonpuckett profile image
Winston Puckett

Hmmm... I guess I'm still not convinced. What I'm talking about using these for, I would never want to mock or inherit from.

I could see your argument that this creates strong coupling, but I would only ever call this code in one place and I would want it to fail at the same time as the rest of my user flow. I'll have to think more about the nature of coupling though. That may win me over in the end.

Thread Thread
 
mcsee profile image
Maxi Contieri

sure !

Coupling is not obvious on small systems.
But it is the infection on larger ones

maximilianocontieri.com/coupling-t...

Thread Thread
 
winstonpuckett profile image
Winston Puckett • Edited

I'm using this in a 100,000+ line, enterprise scale code base and having great success 😁