←back to thread

214 points chhum | 1 comments | | HN request time: 0.204s | source
Show context
exabrial ◴[] No.44006194[source]
Java performance isn't the fastest, that's ok, a close 3rd place behind C/CPP ain't bad. And you're still ahead of Go, and 10x or more ahead of Python and Ruby.

Java syntax isn't perfect, but it is consistent, and predictable. And hey, if you're using an Idea or Eclipse (and not notepad, atom, etc), it's just pressing control-space all day and you're fine.

Java memory management seems weird from a Unix Philosophy POV, till you understand whats happening. Again, not perfect, but a good tradeoff.

What do you get for all of these tradeoffs? Speed, memory safety. But with that you still still have dynamic invocation capabilities (making things like interception possible) and hotswap/live redefinition (things that C/CPP cannot do).

Perfect? No, but very practical for the real world use case.

replies(15): >>44006269 #>>44006358 #>>44006411 #>>44006567 #>>44006570 #>>44006865 #>>44007100 #>>44007464 #>>44007662 #>>44007666 #>>44009121 #>>44009861 #>>44011219 #>>44011642 #>>44012473 #
Thaxll ◴[] No.44011219[source]
Java is not ahead of Go, they're on part but often Go is faster while using 2-10x less memory. Value type makes optimization much easier in Go.

The fact that you specifically mention Go explains a lot. btw c# is faster than Java, so not third place, it's more a 5th~

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

replies(1): >>44011329 #
999900000999 ◴[] No.44011329[source]
Doing what?

Benchmarks aren’t all that useful since usually the bottleneck is File IO, external api calls, db calls, user latency or a combo of the 4.

Go’s main advantage in this matchup would be conciseness.

Go code looks so clean and nice, Java doesn’t.

I personally don’t care for Java, but I have bills so it’s always in my back pocket. Things happen , sometimes you need to write Java to eat.

“Fred, you really should just take the job.”

“Martha you don’t understand, it’s Java with an Oracle DB.”

“Fred, I know it’s bad, I know you still have nightmares about the 4 types of string in Java 8, but it’s not just us now.”

With a tear in his eye , fear in his heart.

“Martha, if I must… I’ll open Eclipse once more.”

replies(2): >>44011370 #>>44011783 #
1. noisy_boy ◴[] No.44011783[source]
> I personally don’t care for Java, but I have bills so it’s always in my back pocket. Things happen , sometimes you need to write Java to eat.

I write Java to pay bills and my eyes and fingers thank me everyday for sparing them from a sea of if err != nil. I won't even go(!) into the iota stupidly compared to Java's enums.