Lew said:
Arne's advice
was meant to exclude hand-copying. He was referring to copy-and-paste
from real code.
Copy-and-paste is not always reasonable to expect. In this instance, for
example, to do it by copy-and-paste would have entailed copying from
four separate source files, then doing quite a lot of hand-deleting,
since the actual classes and interfaces involved are considerably larger
than the distilled-down examples. It would have easily taken ten or more
times as long.
And it would have been very easy to introduce an error, for example by
deleting something essential by accident while trimming the irrelevant
or by leaving in a reference to yet another class or interface that
would no longer resolve.
Most likely, instead of one minor keyword substitution (where the
intended meaning, to humans, was not even affected) there would have
been two or more errors, possibly more serious.
I only disagree slightly, because actually he's right - it really is
better to post real code, except sometimes the snippet is so short
Like this time? Twenty lines, including one only-a-comment line and one
blank line inside a class. Three of the classes only three lines long each.
The original source runs to dozens of lines (a lot of it Javadoc, of
course) per interface and a couple of hundred in the concrete class.
Copying that and then deleting most of it and editing the rest would
probably have resulted in a higher error rate, as well as consumed more
time, than writing out "the gist" longhand.
The beauty of this group is that people will catch the error most of the
time. Happens to me a lot.
What I find disturbing is that nobody could see past it to the matter
actually at issue, which still does not seem to have been addressed. The
pedantic focus on the implements-vs.-extends issue completely derailed
the thread and the actual matter of original interest got completely
sidelined.
This is doubly odd in light of the observation that this is a nonlinear
medium where both could be addressed, concurrently, in disparate
branches, even by separate people.
I therefore have to wonder if there are other motives to the
fault-finding behavior observed than purely to altruistically alert
others that might not be as familiar with Java's normal usage of the
extends and implements keywords, given how eagerly that was pursued --
indeed, it was pursued *so* eagerly that it was apparently pursued to
the exclusion of *any* pursuit of the intended topic of the thread.