Live data from Hacker News

Java Is Underhyped

jackson.sh

541–550 of 808 posts

Re: Java Is Underhyped

#541

There is no greater sin than to say something positive about Java on the orange site... IMO Java and C# and other compiled languages have the opposite problem with languages like python and JavaScript (I love all these languages btw). It’s easy to get up and running quickly with the latter. It’s not until your project has grown in complexity when the formers value becomes apparent. This is similar to mongodb vs say,…

As someone currently trying to juggle a massive, extremely complex Python project, our code looks very Java-esque just so we can actually understand what's going on. Java/C# absolutely have a place, but the heavy startup mentality here will always lean towards "whatever lets me pump out my crapware and go to market fastest". Startups aren't known for producing well maintainable code (not that you can't make maintainable code with JS/Python, it just gets much harder at higher complexity scales).

Re: Java Is Underhyped

#542
post #381

This post from "an ignorant computer science undergrad" is pretty silly, so allow me to get a little silly in response. I think if Java's new features are an attempt to woo new developers, Java comes off pretty tragically, like the old guy in the club, trying stay relevant by showing off how it just got up to date with ideas that hit the mainstream ten years ago. Whoa, check out these record classes! Fresh stuff over…

I’ve already moved to Kotlin. I love the language other than the fact that JVM objects are just too heavy. Nothing against Java but language has aged like milk, the readability and writability is just too bad. Recent strides with records and project loom etc are evident efforts to make it evident again.

I’ve kinda started to like Kotlin from syntax perspective & Go’s nature of compiled and low overhead prospective. I wish somebody can combine those together (don’t tell me GraalVM).

Re: Java Is Underhyped

#543
post #336

For my use cases, Java has all the wrong compromises: - not high level enough to compete with Python/Ruby/JS/PHP, etc - not low level enough to compete with Rust/D/Nim/Zig - not specialized enough to compete with Erlang/R/Go/Julia - not opinionated enough to compete with Lisp/Haskell So why use Java ? It's good, it's fast, it's productive, it's well supported, battle tested and documented for decades with a huge pool…

My main issue is that people writing Java (or for the JVM) because of their backgrounds (app-level code printers) almost completely disregard how that code works on the JVM, at scale, in a highly responsive and/or high throughput service. You can't just use a big, "safe bet" framework like spring, which taints EVERYTHING in that project, write a simple REST API and then do heavy work "in the background" without side…

I think it’s not a language problem. Frontend devs can be just as clueless, and don’t even get started on bad programmers writing in low level languages. Basically, the reason Java become so popular at the time was the bad programmers writing leaking, segfaulting programs in c++. Now they write bad programs in Java that “works” when one looks at it from an angle and is lucky.

Re: Java Is Underhyped

#544
post #11

Earlier quoted context omitted.

I am sorry, Go? That can’t be right. I even doubt it’s any more verbose than python or swift. You CAN make it verbose that’s for sure.

> You CAN make it verbose that’s for sure. No true scotsman? Even if you want to argue that Java CAN be made more terse, the vast majority of Java that exists today is incredibly verbose. Even running a Java program is verbose. Java is the only language I've used where it's more common to have a shell script that starts your Java program than just running ./helloworld. And yes, Go is less verbose than Java. Go might…

Go's error handling is painfully verbose. Go's lack of generics leads to passing empty interfaces everywhere (come on proposal!). Don't act like go doesn't have it's warts. If it wasn't backed by google it wouldn't be nearly as popular as it is.

Re: Java Is Underhyped

#545

Earlier quoted context omitted.

>the Python community is at least half composed of amateurs. or, even worse, scientists.

And most recently, tons of self styled "Data scientists". This has, IMO, diluted the rabid rhetoric of the 90's/oughties python community which is good, but replaced it with people who don't know and don't care what good code even looks like, so it can be difficult to work among them.

I feel sometimes that they pride in writing shitty, unmaintainable code; that they do it on purpose. One of the ways they enjoy life is to disregard all "best practices". And I'm not talking about some high-level OOP principles, but the basics - like keeping consistent code style, or even writing some tests.

The previous crowd with love for monkeypatching everything and hate for abstraction other than dictionaries wasn't too pleasant, too.

Re: Java Is Underhyped

#546

Earlier quoted context omitted.

I can (and often do) build from CLI, that is much smoother. I tried using vim on java, but honestly you need an IDE for all the constant code generation and incessant fixups by mouseclicks that are needed. Vim+coc is more than enough in the other languages that I use.

You're living in a parallel universe from the rest of us. IDE isn't necessary (and positively odd) for building Java.

He is. VsCode (or any editor) + the Eclipse Language Server is more than enough. His complaints about debugging is because he doesn't know about attach debugging.

Re: Java Is Underhyped

#547
I've never heard someone with experience in npm say they love maven. Interesting. Regardless, I actually agree Java is a fine language. I'm still surprisingly productive in it despite 10 years of time away.

However, it's the culture around Java that I hate, and that's the reason I avoid Java. The amount of low quality Java code out there is staggering. The culture around Java is one of extreme levels of abstraction and encapsulation, and it makes reasoning about Java code really painful some times. If you have worked in a Java shop, check out the Enterprise edition of FizzBuzz: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

Re: Java Is Underhyped

#548

Earlier quoted context omitted.

It is, but if all you want is a JVM, Java is still probably the worse choice over Scala or Kotlin

The exact opposite is true. Scala's and Kotlin's syntactic sugar comes with tonnes of overhead and additional allocation. Java is pretty raw compared to them and allows you to stay closer to the C-spirit and thus retain more control over the side effects of the code you write.

You can write Scala to pretty much just look and run like old school Java if you want.

I haven't seen any benchmarks, but I doubt a Scala app written idiomatic style would be any slower than the Java version written in idiomatic style.

Also, what is this C spirit we are trying to stay close to? I'm certainly not interested in any "C spirit"

Re: Java Is Underhyped

#549
post #343

Earlier quoted context omitted.

It's horses for courses. Some plus points for Java: - you can integrate code from hundreds of developers fairly safely (knowing that no one has changed the default behaviour fo builtins and different dependencies won't clash). - the syntax, although not the most succinct is fairly easily readable and maintainable by other developers.

> - you can integrate code from hundreds of developers fairly safely (knowing that no one has changed the default behaviour fo builtins and different dependencies won't clash). It's exceedingly rare for this to be untrue of Python — it's technically possible to hack builtins but there's intense community pressure against doing that. > - the syntax, although not the most succinct is fairly easily readable and maintain…

> This is sort of true but it misses the aspect which makes Java hard to maintain

The boilerplate syntax you talk about comes from like java 1.4.

Modern Java is quite expressive with streams and lambdas. If one does employ the Java Beans convention than yeah, he/she has to autogenerate a few getters setters, but those don’t occlude the actual logic.

And frankly, empirically, Java is anything but hard to maintain. You would be hard pressed to find many languages that continue to manage at the scale Java apps routinely handle.

Yeah, it’s (typical business monstrosity) hard to understand, probably has many thousands hours of technical debt, but it just works, and more things can be added to it (and occasionally with much more work, removed as well).

Re: Java Is Underhyped

#550
post #488

Earlier quoted context omitted.

I think Kotlin is pretty much what a modernized Java should be. Between it and Clojure I don't spend very much time with Java anymore.

Kotlin could he better, but doesn't go all the way. Without HKTs and implicit injection, Java is going to eat its lunch. Java already has records, type inference, parametric null safety with Optional, Loom provides coroutines, vavr and streaming apis have given us theabilitytodo FP... what's left as a unique feature? Kotlin will survive because it was picked for Android to avoid copyright issues. But the difference b…

Could you clarify the point on Android and copyright issues? At least at the time in 2017 when Google blessed Kotlin as an officially supported language, it seemed like the reasoning was Kotlin was far more ergonomic than Java. How does copyright come into this?
Post reply on HN