Re:Relax. You can (mostly) stop using Interfaces in Java now
by chubbard on Monday March 08, 2010 @01:52PM
(#1176067)
How about trading off code readability for code complexity that has some potential future payoff? Library developers might want to trade more of their readability than app developers because of the nature of 3rd party code. It's ultimately a trade off that you have to make, but there are some general rules of thumb can help you so that uber flexilibity doesn't take over.
Re:Relax. You can (mostly) stop using Interfaces in Java now
by jfager on Monday March 08, 2010 @02:36PM
(#1176196)
Do you really think that interfaces on their own constitute 'uber flexibility taking over'?
Re:Relax. You can (mostly) stop using Interfaces in Java now
by chubbard on Thursday March 11, 2010 @02:57PM
(#1184712)
Prolific over use of interfaces when all you have is a single implementor. In a word Yes.
Re:Relax. You can (mostly) stop using Interfaces in Java now
by brazzy on Tuesday March 09, 2010 @07:44AM
(#1178076)
Please read the article. Its title is very misleading. Basically it only says "With this great new mocking framework, you don't anymore have to create interfaces for everything just to be able to write proper unit tests".
Re:Relax. You can (mostly) stop using Interfaces in Java now
by kaffeinecoma on Monday March 08, 2010 @08:45PM
(#1177203)
The point of the blog post was that we should use interfaces when appropriate, just not by default.
Re:Relax. You can (mostly) stop using Interfaces in Java now
by jfager on Tuesday March 09, 2010 @09:47AM
(#1178330)
I recognize the point of the blog post, but I think that's it's more dismissive of interfaces than is warranted - the title outright says to mostly stop using them, and the 3rd paragraph suggests their use is split between over-engineering and mocking. It's not until the end that you start talking about what else interfaces are good for, and even then there's a sense that you think they should be used with care.
I just disagree with that; I think it's far better to have an interface you don't really need lying around than to be caught without one when you do need it.
What's the perceived downside of using interfaces? That you end up with more files? That you dead-end into bare method declarations when browsing your code? Any others?