Re: Any Checkstyle users?




"Roedy Green" <my_email_is_posted_on_my_website@xxxxxxxxxxxxxx> wrote in
message news:aartt1598ti9ueif5n0ab8doamgh6rbtt6@xxxxxxxxxx
> On Tue, 31 Jan 2006 14:18:38 +1000, "Tony Morris" <not@xxxxxxxxxxx>
> wrote, quoted or indirectly quoted someone who said :
>
> >
> >You should be using a Map reference.
> >All aside from the false assumption that HashMap is indeed useful.
>
> Does that buy you anything other than it prevents you write locking
> yourself into ArrayList by using non-Map methods?
>
> The penalty is you are using slower interface references rather that
> direct class ones which require a much more convoluted scheme to find
> the appropriate method on each call.
>
> Another penalty is you increase the complexity of the declare and I
> figure make it less readable, at least to newbies.
> --
> Canadian Mind Products, Roedy Green.
> http://mindprod.com Java custom programming, consulting and coaching.

Separating contract from implementation is something that Java has failed
miserably at, while pretending to do otherwise.
The advantages to a correct separation are widely misunderstood and not even
addressed in some of the most prominent literature.
The argument regarding the "performance hit" for lookup of virtual calls is
fall of nothing more than air - I'm sure (at least, I hope) you'll agree. In
fact, it has nothing at all to do with interfaces, and everything to do with
the level of depth in "virtuality" of the lookup, which class types can also
"suffer" from.

"Newbies" very rarely suffer from the apparant complexity because they have
no deeply held notions about how things "should" look, in contrast to the
many contrived ideas by "non-newbies". At least, this is my observation
according to experimentation - I can explain a somewhat trivial concept to a
vulnerable mind, such as my first year students, and I will be asked all the
right questions - to the junk-filled mind, I typically hear religious
refutation and 'reiteration of the guff', which is strongly guarded by ego.

--
Tony Morris
http://tmorris.net/


.