Reply to post: Re: Most of these are "screw the coder" misfeatures

Java 17 arrives with long-term support: What's new, and is it falling behind Kotlin?


Re: Most of these are "screw the coder" misfeatures

Delegation does not help at all if you cannot use your own class in place of the other, which is the case if there is no common interface to implement. Of course, with your own code and sanely written libraries/frameworks, this is not something you'd be forced to do in the first place, but unfortunately a lot of stuff you encounter in enterprise development is horribly written/structured - look no further than some of Oracle's own products. Without the ability to replace an instance with a subclass of your own, you're screwed.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon