Remix.run Logo
lisbbb 6 days ago

Over multiple decades, I have come to reject all of it! Even interfaces.

I watched over and over again people writing code to interfaces, particularly due to Spring, and then none of those interface ever got a second implementation done and were never, ever going to! It was a total waste of time, even for testing it was almost a total waste of time, but I guess writing stubbed test classes that could pretend to return data from a queue or a database was somewhat useful. The thing is, there were easier ways to achieve that.

zaphar 5 days ago | parent [-]

Those interfaces that never got a second implementation were still defining the contract for interacting with another part of your system and that compile time enforced contract provides value. I have plenty of complaints about Spring but interfaces is not one of them.

noname44 3 days ago | parent [-]

whats the value of defining contract in that case!?