Re: Is 'Final' for classes and methods a good feature or something that should be eliminated?



Michael Feathers <mfeathers@xxxxxxxxxxxxxxxx> wrote:

Final gets in the way of both of those. Really, there are very few
alternatives at the unit level.

I hardly ever use either of those methods when I write unit tests, so
I don't see how that can be true. After all, you're testing the code
that uses the final-ed object, and not the final-ed code itself.

Sure, it's sometimes _convenient_ to be able to proxy an library
object by inheritance and overloading, but I can't really see any
situration where it's _necessary_ for writing an Unit test.


--
Leif Roar Moldskred
.