I don't follow Java development, but I have worked in it occasionally, and every time I do something in it, I'm inevitably surprised by having to use one of this commons libraries for something basic. Is there a reason some of this stuff isn't added to the base framework?
- Java has historically included things in its standard library that (presumably) everyone regrets nowadays, like CORBA support. The standard JRE is already overweight. Also keep in mind that size matters for Java - in theory, it's a client side environment that's downloaded and installed by consumers (of course, in practice nobody does that anymore). - The standard library has to be implemented by all JVM vendors, s…
Reasons to use Guava
11–20 of 50 posts
Re: Reasons to use Guava
#12Well, I recommend to move to scala language instead :)
I really find this kind of Snark disappointing on HN, and one of the many examples of a decline in the quality of comments that PG has talked about.
Re: Reasons to use Guava
#13http://download.oracle.com/javase/7/docs/api/java/util/Objec...
Re: Reasons to use Guava
#14One thing I'm not a fan of is the functional stuff. The idea is good, but java is just too verbose. Without real lambdas, like C# has now, it ends up being not so useful.
Re: Reasons to use Guava
#15I am a fan of Guava, not just as a very useful library, but as a way to read really good Java code. Check the source out, it is imo a must if you are a java dev. One thing I'm not a fan of is the functional stuff. The idea is good, but java is just too verbose. Without real lambdas, like C# has now, it ends up being not so useful.
Re: Reasons to use Guava
#16Well, I recommend to move to scala language instead :)
Re: Reasons to use Guava
#17Adding to #1 : Using static imports to import the newHashMap() method can make the statement even shorter : final Map > lookup = newHashMap(); This serves to make the code far more readable.
In bolts, it's Map > lookup = Cf.hashMap(); Which is as short and also doesn't require static imports. Bolts are the state of art FP library for java. https://bitbucket.org/stepancheg/bolts/src/tip/src/main/java... some examples in tests
Re: Reasons to use Guava
#18Re: Reasons to use Guava
#19Well, I recommend to move to scala language instead :)
I don't really see what this has to do with the article itself. It's totally ridiculous to compare learning a new language, developer tools etc. with adding a single library to a project. Also, Scala is specifically designed to bring many benefits at the language and library level that Guava won't. I really find this kind of Snark disappointing on HN, and one of the many examples of a decline in the quality of commen…
Either you like Java and you don't need Guava, or you want functional programming and other goodness and for that Scala is a better language.
Re: Reasons to use Guava
#20Java 7 also adds java.util.Objects, which contains hashcode() and other useful methods: http://download.oracle.com/javase/7/docs/api/java/util/Objec...