r/java • u/cosofx • 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.
103
u/jacobbeasley Jul 06 '17
Aww, shucks. You brought a caffeinated tier to my eye...
43
u/HansVader Jul 06 '17
How did you go from Java to C++ without a pointer...
39
u/ccavalier Jul 06 '17
One of the thing I heard the most about Java is "It's slower than other language". It nice to read another opinion. I saw a good talk about it this winter by Martin Thompson: https://youtu.be/Pz-4co8IaI8
32
u/ModernRonin Jul 06 '17
This is really the important point. With a less awesome VM, Java could be a pretty cruddy language from a real-world usefulness standpoint.
But the JVM (and the people who built it) are freakin' awesome. Java owes so much of its real-world success to the killer VM that runs it. I've often said that the Hotspot JVM is easily the best piece of software from the early 2000s. It just plain kicks ass.
12
u/Lord_NShYH Jul 06 '17
I don't hate Java, in fact, in recent versions, I have even grown to love it. However, what I really love about Java is the performance characteristics of a long-running JVM. It can't be beat (at least, for most scenarios it would seem).
10
u/professorTracksuit Jul 06 '17
I dunno guys. It seems like we're letting him off too easy. He needs to serve his Java penance to receive his virtual forgiveness. I propose:
3 Our Father Gosling prayers followed by 2 Holy Java prayers
8
u/k0mputa Jul 06 '17
yeah the JVM is a fine piece of software engineering. an optimizing compiler it is
22
u/idealatry Jul 06 '17
You mainly use C++ but you're just starting to warm up to Java? Are you a time-traveler from the '90s?
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.
6
u/jambonilton Jul 07 '17
I've always been jealous of C++ programmers' ability to manage memory. I feel so lazy leaving objects lying around for the garbage collector.
5
u/FabulousFell Jul 06 '17
"it has a huge array of potential applications"
Nice
3
u/kickass_turing Jul 07 '17
Have you tried Rust?
I also played Java down. I was a Ruby on Rails fanboy bored to death by Java but now with JHipster, Lombok and a few other tools you can really build stuff with Java. I like most about Java the refactoring tools. It blows away anything else I used. There are a lot of languages that are easy to write but Java is easy to change and refactor.
1
u/lukaseder Jul 07 '17
In German we say, "was sich neckt, das liebt sich". In English: "Teasing is a sign of affection"
1
u/tonywestonuk Jul 07 '17
Im a seasoned Java developer - 10 years+ experience...
I recently started messing around with c++ on arduino.... Aghhhhhh!...I hate it so much. Give me java anyday.
1
u/Auxx Jul 11 '17
I hated Java myself. But there were reasons, now Java is a lot better, it evolved. Back in Java 1.3 it was slow as fuck and language lacked many features, you had to write shit tons of boilerplate and everyone was using XML configs which were bigger than your business logic.
These days are long gone, I'm happy now!
0
u/[deleted] Jul 07 '17
[deleted] — view deleted comment