Live data from Hacker News

Java Is Underhyped

jackson.sh

681–690 of 808 posts

Re: Java Is Underhyped

#681
How Java 16, 17 or whatever can claim to be catching up to anything, let alone Kotlin, whilst it still requires developers to escape regex metacharacters - even after introducing raw strings - is beyond me.

Re: Java Is Underhyped

#682

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…

Python's tooling is horribly underdeveloped... And you notice that when moving from Java to Python. And all the solutions are at this point in time are hacks.

If I needed to waste more time on hacking a setuptools script, to get a file placed into /usr/local/lib/shared... I'd rather use Go or Rust.

Re: Java Is Underhyped

#683

Earlier quoted context omitted.

I write software in Java. I can't stand python - too wishy-washy. But my main complaint about Python is trying to use someone else's software. Then it degenerates into a maze of twisty little passages of trying to install the correct set of dependencies, not knowing where those files are installed (which makes it difficult on a cluster, as you may need to do the install on every node separately). Then you try using p…

I came to say say that's not a language problem, that's a packaging problem. But that would be misleading. The reason packaging is still a problem in Python are linked to the language: - to get perfs, you need compiled extensions, which java doesn't need. So a Jar can be fast and portable, while in Python it's an "or" proposition. Wheels help, but they still are OS dependent, so you need a build per OS. - PYZ arrived…

So... Java is bad, but let's ignore Python's problems.

I'm forced to use Python at work, because data scientists demand it, and I can rant about your "good for data" language for at least 24 hours straight.

Python isn't great at anything specifically, but it's crap in a few specific places. No multithreading? Fine! But then Python core libraries are crap at IPC, when multiprocess is the preferred way of parallel computing!

Re: Java Is Underhyped

#684

Earlier quoted context omitted.

I don’t think that’s true at all. Like most languages, Java has its share of deficiencies - I’d personally put null handling, type erasure and brain dead Optionals near the top of my list of things I’d change if I was King of Java - but fluent APIs and factory methods didn’t even start with Java, and have nothing to do with “everything is a class”.

What is wrong with Optionals?

Optionals can be null, so dereferencing them can still cause an NPE. Also the syntax is horrible.

I know the excuse that they are just meant to be used to wrap the return value of a function that might be null, rather than as a guard against NPEs, but that just means we’ve got a crappy, verbose Optional class ... and NPEs.

It was the most half assed attempt to fix the billion dollar mistake [0] anyone could have come up with. It needed syntax and compiler support, not a stupid wrapper class.

[0] https://en.m.wikipedia.org/wiki/Tony_Hoare

Re: Java Is Underhyped

#685

Earlier quoted context omitted.

I write software in Java. I can't stand python - too wishy-washy. But my main complaint about Python is trying to use someone else's software. Then it degenerates into a maze of twisty little passages of trying to install the correct set of dependencies, not knowing where those files are installed (which makes it difficult on a cluster, as you may need to do the install on every node separately). Then you try using p…

Java is so much worse on this front. > with Java, you just dump the necessary jars into a directory, include them in the classpath, and it works. Ant, maven, or gradle, and then some jars, somewhere? What's the classpath and whats $JAVA_HOME for this project? Oh and now I have to make it work in the IDE too, click through a billion menus and dialogs, sync the build system, sync the dependencies, configure runtimes an…

I have no clue what you're talking about.

Maven can build a nice fat executable jar, with just one XML block added to the pom.

I've opened a 5year unmaintained project with IntelliJ yesterday - click package and got a working executable.

I opened another project built with SBT... and guess what? No errors!

Let's try that with a Python project (LOL!)

Re: Java Is Underhyped

#686
post #136

Earlier quoted context omitted.

Python projects that start to grow has a tendency to become hard to manage in a way that I have not seen in Java at all. Java is like you say not the greatest at anything but it is also not the worst at anything. Its great for projects where the you don't know what you should optimize for or don't care. If java is to boring maybe kotlin is the way to go. I really like kotlin and in my personal experience the only dow…

I used Kotlin in a large codebase, and one of my only complaints is the compile times. We use Gradle for our build system, and relative to Java it is slooowwww. But we like the other benefits of Kotlin, so it's worth it in the end. But if they could get compile times down, it'd be the perfect language imo.

1.5.0-RC was released a few days ago and contains rewritten compiler code which promises significant speed improvements.

Re: Java Is Underhyped

#687
Java is the mini-van of programming languages.

It's not fast, not specialized, but is completely adequate for almost all use cases.

A mini-van is incredibly boring, but that's also it's best selling point.

Re: Java Is Underhyped

#688
post #615

Earlier quoted context omitted.

> Well Java is arguably one of the most IDE-reliant mainstream languages. It's completely unusable and unergonomic without the myriad of constant code generation and fixing as you write. True, but with IntelliJ 99% of what you wrote is auto-configured. Eclipse needs a bit of hand-holding, but almost everything you described is due to project configuration. > Some genius java logging library, I can only guess. That's…

> with IntelliJ 99% of what you described is auto-configured It is not, that's what I'm saying. And I don't understand why, if IntelliJ is the de-facto IDE. I'm sure that a fresh project is a one-click import, but an average project that isn't fresh anymore, always have similar IDE-setup-magic problems. At least in my experience over the years.

I code in Java, Scala and Python using an IDE just because I like to not remember the documentation to the code.

I know plenty of people who don't use a formal IDE. This "I don't use an IDE" is a stupid flex.

Re: Java Is Underhyped

#689
post #373

Earlier quoted context omitted.

> I know you will say, this is all fault of whoever made this crap project It is. There's really no excuse for that. If it's been similar every time then you've worked on crap every time. Building a java project should be (and is on projects I work on) as easy as installing a jvm and running either maven or gradle to build it. End of story. "Install some lombok plugin" is only necessary if you want the IDE to underst…

No offense, but regardless of how right you might be, you come off as a bit of a condescending asshole. Like "Oh, you don't know that there's a more efficient way to do things? There can't possibly be any explanation other than you're literal human garbage and presumably have brain damage!". Come on, get off your high horse.

There's a difference between - "anything can be turned into an non-compiling pile of crap" and "this ecosystem comes as a pile of crap".

Re: Java Is Underhyped

#690
post #272

Earlier quoted context omitted.

I generally agree, except the part about the low risk of runtime surprises. Java's type system is so weak that it doesn't even prevent null from inhabiting almost every type. The programmer is then forced to manually reason about when a value can be null or not, and of course humans can easily make mistakes in doing so. This inevitably leads to NullPointerExceptions at runtime when a project becomes sufficiently comp…

> Java's type system is so weak that it doesn't even prevent null from inhabiting almost every type. "So weak"? You do realize that this is basically where every language was less than a decade ago?

There are tons of languages with non-nullable types that are much older than that. C++, basically every ML-influenced language, Prolog, Erlang, Tcl.
Post reply on HN