News for hackers. Stuff that matters.
Re:Inheritance was invented as a performance hack by svieira on Friday May 09, 2025 @01:43AM (#43934094)
It would be the other way around. You wouldn't pass around the underlying suppliers directly, you'd wrap them. But if you must have state _and_ behavior, then `abstract class` is your friend in Java (while in Scala traits can have fields and constructors, so there is no problem).

There are no comments on this comment yet.