Regarding Collections.list(a, b, c, d), see Arrays.asList. On Tue, Jan 24, 2012 at 10:19 PM, Josh Berry <[email protected]> wrote: > On Tue, Jan 24, 2012 at 7:18 PM, Fabrizio Giudici > <[email protected]> wrote: >> But the previous examples referring to tons of popular Java libraries are >> pretty clear to demonstrate that well designed libraries can be reused. >> Given that we're basically talking of the Java ecosystem, which I think most >> people acknowledge is one of the biggest in the world when compared to other >> languages, I think that the conclusion that Java does pretty good code reuse >> in comparison to other languages is evident. > > To be fair, a lot of those libraries cited as examples are duplicates > of each other. I make no claims that this is a good or a bad thing, > but it was just recently when it was mentioned that Guava can replace > a lot of apache commons libraries. Libraries that, as far as I know, > do not actually have any bugs. They just haven't been updated in a > while. Even when items are not full on duplicates of each other, how > many libraries have a primitive hashtable to avoid boxing? (The jgit > author specifically mentions having written one.) > > And this may have been the author's point. The core library has > favored deprecation to code reuse to a large extent. Hashtable versus > HashMap is an easy example. This is ignoring such new collections as > ArrayDeque. Then there is the increasing size of imports necessary > to use core collections. Static factory methods help a lot with this, > but were not used by core apis. (I'm specifically thinking about > collections here. Seems having Collections.list(a, b, c, d) would > have given an easy way to shield folks from even importing ArrayList, > but still getting it most of the time.) > > As I said, overall article is still flame bait, far as I can tell. > Just not sure I understand some of the rebuttals as being actual > rebuttals. Just loud proclamations of dissent. > > I should also add that I favor Knuth's view on code reuse as a whole. > So, still not sure I understand the code reuse arguments. Pro or con, > at this point. > > -- > You received this message because you are subscribed to the Google Groups > "The Java Posse" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/javaposse?hl=en. >
-- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
