Re: Does using generics complicate the use of interface-type declarations?



"jan V" <nul@xxxxxx> wrote in message
news:ZnhTe.187397$BI5.10302537@xxxxxxxxxxxxxxxxxxxxxxxx
> List materialsList = new ArrayList();

I'm relatively neutral on this topic in the sense that main reason I use
"ArrayList materialsList = new ArrayList()" instead of "List materialsList =
new ArrayList()" is because I'm too lazy to put in two import statements
(even with the help of Eclipse, that's TWO quickfixes I have to apply
instead of one). This is especially true for local variables that "no one
will ever see", as opposed to when I have to code public interfaces which
"must never change" (in which case I *would* use List over ArrayList, so as
to give myself as much room as possible).

That being said, doesn't the "List materialsList = new ArrayList()"
solution increase dependencies in the sense that your code now relies on two
types (i.e. List and ArrayList) instead of just one (ArrayList)?

- Oliver


.



Relevant Pages

  • Re: hlob vaj pov tub nkees, rau reason
    ... reason wrote: ... us becase we would be retreating to Thailand. ... retreat does not mean evacuate. ... hlob vaj pov not 'lazy'. ...
    (soc.culture.hmong)
  • Re: hlob vaj pov tub nkees, rau reason
    ... you'll argue yourself into retard lazy oblivion. ... reason wrote: ... us becase we would be retreating to Thailand. ... retreat does not mean evacuate. ...
    (soc.culture.hmong)
  • Re: hlob vaj pov tub nkees, rau reason
    ... reason wrote: ... retreat does not mean evacuate. ... tis plan and simple. ... hlob vaj pov not 'lazy'. ...
    (soc.culture.hmong)
  • Re: [video] Smile Carucci - Cigarette Tricks 09
    ... I'd also argue that the majority of smokers don't smoke ... Also, how lazy is lazy? ... reason, you need to be punished, probably. ... Taking this example, what if you were smoking and not bothering anyone, ...
    (rec.juggling)
  • Re: [video] Smile Carucci - Cigarette Tricks 09
    ... because they need to or because they are lazy. ... I'd also argue that the majority of smokers don't smoke ... reason, you need to be punished, probably. ... Taking this example, what if you were smoking and not bothering anyone, ...
    (rec.juggling)