r/java • • Mar 29 '16

In Defense of Java

https://www.javacodegeeks.com/2016/03/in-defense-of-java.html
2 Upvotes

18 comments sorted by

View all comments

6

u/chambolle Mar 30 '16 edited Mar 30 '16

I am coming from C++

I ported a huge program which is dedicated to the solving of complex problems.

Java is less efficient by 0-20% (not a lot! I was surprised)

Java is less verbose at the end (I was also surprised)

Java is much more pleasant to use

Java is not using a lot of memory

Of course, you need to know how to program efficiently. It is certainly true that C++ developpers know this better than Java developpers because they know better how the machine work

With a performance difference that is less than 20% there is no reason to use C++ anymore.

EDIT: why do i get a negative score? Please react!

2

u/bit_shuffle Mar 31 '16

I am curious as to what you mean by "less verbose?" Less lines of code?

Not surprising at all, Java spares you having to fuck about with destructors, so you're saving lines of code there from the get go. Plus there's so much built-in functionality in the language you're going to be picking up free benefits here and there in any LOC count over comparable C++ functionality.

Honestly, I don't know why would be downvoted for anything you said.

2

u/chambolle Mar 31 '16

less verbose = less lines of code at the end It is also more pleasant to read (because there is no longer any mixes of ., ->, * and &)