News for hackers. Stuff that matters.
Re:The Big Oops: Anatomy of a Thirty-Five Year Mistake by nine_k on Wednesday July 23, 2025 @07:01PM (#44664944)
In short, in my opinion:

- Encapsulation / interfaces is a good idea, a continuation of the earlier ideas of structured programming.

- Mutable state strewn uncontrollably everywhere is bad idea, even in a single-threaded case.

- Inheritance-based polymorphism is painful, both in the multiple (C++) and single (Java) inheritance cases. Composable interfaces / traits / typeclasses without overriding methods are logically and much more useful.

Re:The Big Oops: Anatomy of a Thirty-Five Year Mistake by lisbbb on Thursday July 24, 2025 @12:04AM (#44666804)
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.

Re:The Big Oops: Anatomy of a Thirty-Five Year Mistake by zaphar on Thursday July 24, 2025 @08:03AM (#44669652)
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.
Re:The Big Oops: Anatomy of a Thirty-Five Year Mistake by noname44 on Saturday July 26, 2025 @05:08PM (#44696931)
whats the value of defining contract in that case!?