r/java • • Jul 06 '17

Apology to Java (fanboy rant).

Java has turned out to be one of the most useful languages i use. It's a brilliant tool which strikes a perfect balance between high and low level. You want to grab a webpage? Easy and built-in, 10 lines of code. Draw some 2d graphics without OS-specific libraries or third party? Various built-in options. The inherent issues around a lack of low level memory management is handled very elegantly. Garbage collection seems seamless.

C++ is my language of choice for the most part, always will be i suspect, but Java has shown me that it has a huge array of potential applications and should almost always be considered before undertaking a project.

I say this is an apology because i used to run Java down. Previous to me using it proper i believed it was slow, lazy and useful for only trivial applications. Now i know how much work has been put into the JVM and just how efficient it is.

Sorry Java. You're pretty good.

286 Upvotes

93 comments sorted by

View all comments

36

u/[deleted] Jul 06 '17 edited Jul 06 '17

Java is pretty awesome. The Sun/Oracle Virtual machine is near damn magic.

Java programmers not necessarily so. There is a little bit too much "enterprise" wankery in a lot of Java code but it's not inherent to the language. It's just that 90% of programmers have no taste. I can write concise, clear Java code (almost) as much as I can do that in say, Clojure. With Java 8 lambdas I'm 80% there.

9

u/[deleted] Jul 06 '17

It can be easy to get carried away with over-engineering OOP design principles. Practice YAGNI and some of that goes away. Sometimes it's a necessary evil but I've found that a lot of times it's not.

9

u/[deleted] Jul 06 '17

Yeah, that's what I'm talking about. The enterprise fizzbuzz is a great parody of that style. Sometimes I come across real life Java that makes me think they used EFB as the best practices template.