Live data from Hacker News

Don’t call it a comeback: Java is still champ

github.com

131–140 of 557 posts

Re: Don’t call it a comeback: Java is still champ

#131
post #2

I've ditched Spring, am using Vert.x with Java 17, reactive & functional styles, records. Seems like a completely different language. If only project Loom will get out there so I wont be coding everything like Javascript I'd be happy. :)

I’d rather write Spring than Vertx callback or observable hell.

Re: Don’t call it a comeback: Java is still champ

#132
I think Java gets a lot of flak because it is so popular within enterprises. And we all know what kind of code gets written in non-IT corporates. Add to that the fact that Java allows you to do a lot means a lot of crazy code was conjured up over the years which then had to be maintained and developed.

If you apply some discipline, I think Java is a great language.

Re: Don’t call it a comeback: Java is still champ

#133
post #27

The only problem Java has is experienced C programmers don't build servers from scratch with it yet. Once they take that responsibility, the debate will be over because: "While I'm on the topic of concurrency I should mention my far too brief chat with Doug Lea. He commented that multi-threaded Java these days far outperforms C, due to the memory management and a garbage collector. If I recall correctly he said "only…

Erlang is not as peformant as Java, but there are plenty of reasons to prefer the former to the latter:

- a much better concurrency model, that gets you parallelism for free just by adding cores

- no global gc pauses, low-latency

- fantastic operational tools (trace debugging, remote shell, etc.)

- Erlang/OTP gives you great middleware out of the box, including including queues, pub-sub, service monitoring, database, etc.

- Honestly just a more expressive core language.

All that said, I don't really have anything against Java. It is a great language for the server, but it is not the only choice.

Re: Don’t call it a comeback: Java is still champ

#134
post #45

Earlier quoted context omitted.

Personal rant: I've never understood the hate towards XML. It's a practical and flexible markup language that does not depend on whitespace or quoting every bloody thing. Plus, every markup language invented since has had to re-invent XML things that, surprise surprise were actually needed. Paths, schemas, comments, etc. I get frustrated with JSON because of things I could do in XML that I can't do in JSON without br…

I think people dislike XML precisely because it's so flexible and unopinionated. It means that when you're parsing a new XML source, you have to look for data that might be encoded in two or three little niches. God help you if it's encoded in each of them, and if the data therein is contradictory. Basically, it's easy to "hold it wrong" in a way that harms consumers.

> I think people dislike XML precisely because it's so flexible and unopinionated.

You're probably right.

> Basically, it's easy to "hold it wrong" in a way that harms consumers.

I feel a bit like this could equally apply to things like GraphQL. I spend more time reading the docs on how someone's internal data model is built than I do writing GraphQL queries. And if I get that data model slightly wrong, my query's garbage.

But that's probably a separate, vendor specific (coughnewrelic), rant.

Re: Don’t call it a comeback: Java is still champ

#135
post #5

Java's adequate. It's like a Toyota Corolla (insert your boring car of choice here if you don't feel this one works for the analogy). Not the prettiest, not the fastest, not the most efficient. But it gets you from point A to point B with little fuss or muss. I totally get why companies adopt and standardize on it. Do I use it for personal projects? Nope. Because it's not fun to "drive". For that, I pick the equivale…

What does that make Scala? A RAV4?

Scala is a ring of four Corollas welded by the edges of their rooftops so that rolling over only changes the set of wheels you're using. Also, all wheels are omni directional so you can drive sideways when required.

Re: Don’t call it a comeback: Java is still champ

#136
post #5

Java's adequate. It's like a Toyota Corolla (insert your boring car of choice here if you don't feel this one works for the analogy). Not the prettiest, not the fastest, not the most efficient. But it gets you from point A to point B with little fuss or muss. I totally get why companies adopt and standardize on it. Do I use it for personal projects? Nope. Because it's not fun to "drive". For that, I pick the equivale…

I am not convinced that Java is adequate. I do not know if the problems are related to the Java language or to the typical Java programmers, but Java is the only programming language where I have seen a strong correlation between the programming language used to implement some application and a low quality of that application. During decades of experience with various programs, whenever I was surprised that a program…

I'm with you, even as a Java developer I can immediately recognize when something was written in Java: it's ugly and slow. When it crashes, you know they missed a NPE or tried to use multiple threads.

Re: Don’t call it a comeback: Java is still champ

#137
post #62

Earlier quoted context omitted.

> The biggest thing Java is missing is full hot swap The biggest thing missing in Java is an answer for the billion-dollar mistake. Real world Java is plagued by NPEs because a lot of Java is written by low caliber programmers. Java + functional error handling would be a monumental improvement.

> low caliber programmers Can't really blame Java for that, though - if everybody standardized on, say, Haskell (or whatever we might agree is the "gold standard" for programming), the low caliber programmers would find a way to do something stupid in it, too. The only way to get around low caliber programmers is to raise the standard, but any suggestion of raising (or even setting) a standard for programming invites…

> Can't really blame Java for that, though

Hmm. Can't I? I know why Sun made Java. They wanted a platform to develop applications that didn't require the skill of a competent C++ programmer. They were targeting lower caliber coders.

I'm a pragmatist; yes, Java programmers would still find escapes, but they'd do it less and so the net number of flaws would be smaller. As jayd16 points out, there is a pragmatic way to deal with this; provide a compiler mode that eliminates null dereferences and rework the standard library to accommodate this. Simple and obvious. Afterwards you can throw the switch on whatever code your facing and you'll know if you're dealing with crap or not.

Re: Don’t call it a comeback: Java is still champ

#138
post #5

Java's adequate. It's like a Toyota Corolla (insert your boring car of choice here if you don't feel this one works for the analogy). Not the prettiest, not the fastest, not the most efficient. But it gets you from point A to point B with little fuss or muss. I totally get why companies adopt and standardize on it. Do I use it for personal projects? Nope. Because it's not fun to "drive". For that, I pick the equivale…

I am not convinced that Java is adequate. I do not know if the problems are related to the Java language or to the typical Java programmers, but Java is the only programming language where I have seen a strong correlation between the programming language used to implement some application and a low quality of that application. During decades of experience with various programs, whenever I was surprised that a program…

Java UI and applets have been abandoned long ago (>10 years). This was partly due to webapps becoming the standard, but also the realization that for desktop apps non-native UIs just suck.

The vast majority of Java (=running on the JVM) software these days is server-side, without any user interface.

Re: Don’t call it a comeback: Java is still champ

#139
post #27

The only problem Java has is experienced C programmers don't build servers from scratch with it yet. Once they take that responsibility, the debate will be over because: "While I'm on the topic of concurrency I should mention my far too brief chat with Doug Lea. He commented that multi-threaded Java these days far outperforms C, due to the memory management and a garbage collector. If I recall correctly he said "only…

> This combined with the fact that Java doesn't crash

Huh? Doesn't crash in what way vs. C? I can still deref a null pointer and blow up.

Java's perfectly fine, and I have no idea why you'd write C any more, but if you care about (extreme) performance and not crashing, Rust seems the obvious modern choice here.

Re: Don’t call it a comeback: Java is still champ

#140
post #5

Java's adequate. It's like a Toyota Corolla (insert your boring car of choice here if you don't feel this one works for the analogy). Not the prettiest, not the fastest, not the most efficient. But it gets you from point A to point B with little fuss or muss. I totally get why companies adopt and standardize on it. Do I use it for personal projects? Nope. Because it's not fun to "drive". For that, I pick the equivale…

I am not convinced that Java is adequate. I do not know if the problems are related to the Java language or to the typical Java programmers, but Java is the only programming language where I have seen a strong correlation between the programming language used to implement some application and a low quality of that application. During decades of experience with various programs, whenever I was surprised that a program…

> Java is the only programming language where I have seen a strong correlation between the programming language used to implement some application and a low quality of that application.

Funny, I hear this sentiment more about PHP which deserved its poor reputation in the early days but is actually quite a nice language now and has been for a good long bit.

I think the biggest problem some people have with certain programming languages is that they don't "look" a certain way they prefer (syntax-wise), or don't have enough modern buzzwords associated with them.

Post reply on HN