By bloid
via michaelfeathers.typepad.com
Published: Jun 30 2008 / 04:25
It was so tempting to start this blog in the classic style: ‘Nested Classes Considered Harmful’, but people turn you off when they see that sort of thing and rightly so. There are few hard and fast rules in software development, and when you take a strident position you end up in a flame war. You can’t have a conversation. So, forget I wrote the “considered harmful" part.
Comments
noahz replied ago:
Not a very convincing argument. You can have naming conflicts other ways, for example inheritance. The article could have been titled "Is poorly-written Java a good idea?"
The article should mention alternatives, such as extracting the class to a top-level class as a package-private (default) access. Also, no discussion of static vs. non-static inner classes. It is important to understand the difference when analyzing the utility of such classes.
Voters For This Link (4)
Voters Against This Link (3)