Re: Using abstract class that implements interface
Tom Anderson wrote:
On Mon, 20 Apr 2009, Lew wrote:
Lew wrote:
See Bloch, /Effective Java/, Item 18, "Prefer interfaces to abstract
classes".
Some of his points:
Interfaces enable safe, powerful functionality enhancements
Tom Anderson wrote:
What on earth does that mean?
It's explained in the referenced chapter.
Okay. Since i don't have a copy of the book, i will thus assume it's
meaningless.
Had I not read the chapter, I would have taken the opposite assumption. You
should assume it has meaning, since the author chose to make the statement. I
didn't think it would constitute fair use to quote the entire chapter, so I
restricted myself to quoting the talking points he introduced. He does
explain what he means by that comment, I assure you, and it has meaning, I
assure you.
I am rather surprised that you'd assume that Joshua Bloch would make a
meaningless statement. You might not agree with him, but he's a cogent writer
and in the habit of providing reasoned arguments with salient examples. It
would make sense to conclude that his statements have meaning, though of
course you might conclude that he's not correct in his reasoning.
FWIW, it's a really good book and very relevant to the improvement of one's
skill as a Java programmer. I highly recommend that you buy the book and read
it. Of course, that will have the side effect of revealing to you what he
meant by that remark.
--
Lew