Link Details

Link 91035 thumbnail
User 111696 avatar

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.
  • 4
  • 3
  • 875
  • 227

Comments

Add your comment
User 288015 avatar

noahz replied ago:

0 votes Vote down Vote up Reply

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.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (4)



Voters Against This Link (3)