Live data from Hacker News

Java Is Underhyped

jackson.sh

101–110 of 808 posts

Re: Java Is Underhyped

#101
post #33

Earlier quoted context omitted.

I always refused to work with C++/Java, and I managed to get a job with Rust at FAANG. If I can do it, you can do it :P

Why would any reasonable person limit their choices based on a tool? Rust or Blast - whatever I really don’t care what language I’m using if it it doing the job. I use Java, Java Script, Go, Python, Scala when appropriate.

Mastering a more powerful tool prepares me for more appealing roles solving harder problems. Time spent on a weak tool is just wasted; it'll never get better and neither will I.

Java has become reasonable though I'd always reach first for Scala or Kotlin (maybe Clojure?) I'd like to work with Rust but it seems hard for an employer to cost-justify the dev work to avoid paying for G1.

Re: Java Is Underhyped

#102

Earlier quoted context omitted.

> Used to be the best way to get a job Java is the most in-demand technology in my home country, Estonia. Java also has around 800 open positions at any given time where I live now (Buenos Aires, Argentina). In fact, pretty much everywhere I've looked, Java is consistently one of the best ways to get a job simply because it has the most jobs available. HN favourites like Go and Rust? I haven't yet found a city in Eur…

Go/Rust will get you hired in Silicon Valley working on "cool" teams. I believe a bunch of AWS teams are deep diving into Rust, and not to mention the hundreds of startups working in Go/Rust. However, the sausage is still made Java. Amazon, Google, and Apple are, as far as a I know, primarily Java shops. It's just no one ever starts a blog with "Here's something cool I did in Java".

[deleted]

Re: Java Is Underhyped

#103
post #33

Earlier quoted context omitted.

I always refused to work with C++/Java, and I managed to get a job with Rust at FAANG. If I can do it, you can do it :P

Why would any reasonable person limit their choices based on a tool? Rust or Blast - whatever I really don’t care what language I’m using if it it doing the job. I use Java, Java Script, Go, Python, Scala when appropriate.

Because some of these tools bring more joy or despair than others. A worker is only but his tools.

Re: Java Is Underhyped

#104
post #37

Earlier quoted context omitted.

Schools use it because it used to be the best way to get a job. Not anymore.

> Used to be the best way to get a job Java is the most in-demand technology in my home country, Estonia. Java also has around 800 open positions at any given time where I live now (Buenos Aires, Argentina). In fact, pretty much everywhere I've looked, Java is consistently one of the best ways to get a job simply because it has the most jobs available. HN favourites like Go and Rust? I haven't yet found a city in Eur…

Try London.

Re: Java Is Underhyped

#105
post #47

Earlier quoted context omitted.

Verbosity is not a problem in large code bases. Speed of understanding and debugging of what somebody else wrote is. So, less magic is better. I will take Java codebase over Scala or Python every time, unless it is a toy script which is 100 lines

Every significant Java codebase I've worked in has had incredible amounts of magic. Between AOP, DI frameworks, APT, reflection, proxies, SPI, Lombok compiler hacks, dynamic classloaders, etc., there is a LOT of magic flying around and it can be quite hard to understand what will happen at runtime.

Still got PTSD from a Hinernate codebase that had all sorts of initialization magic afoot.

Who needs CPP macros when you've got reflection?

Re: Java Is Underhyped

#106
post #7

There are a few reasons to avoid Java today. - The programs are very verbose for the functionality they provide. There are countless lines of getters, setters, and trivial constructors. While IDE helps to write them, it makes reading existing programs slow and frustrating. Lombok helps, but very few programs use it. - If you do want to use Java ecosystem, there is Scala. It also has strong type system, nice IDE suppo…

>- The programs are very verbose for the functionality they provide.

That's true for 2005, not 2021, with var, type inference, closures, streams, and other such features. And since forever getters/setters are auto-generated by the IDE (including Emaca and Vim) and can just be ignored, and Java today has Records which don't need them.

>- If you do want to use Java ecosystem, there is Scala.

Now you have exponential problems. Scala has less support, slower builds, and features Scala-devs are eager to abuse to make the code unreadable.

>- Finally, if you have to run medium to large java programs, you need to constantly tune the JVM.

No, you really don't.

Re: Java Is Underhyped

#107
post #28
post #7

There are a few reasons to avoid Java today. - The programs are very verbose for the functionality they provide. There are countless lines of getters, setters, and trivial constructors. While IDE helps to write them, it makes reading existing programs slow and frustrating. Lombok helps, but very few programs use it. - If you do want to use Java ecosystem, there is Scala. It also has strong type system, nice IDE suppo…

Is the Scala language finally stable? I looked at it and discarded it multiple times over the last decade because every significant language revision required changing source code.

I've been working with Scala professionally for the last 8 years and I consider it pretty stable. Code I've written for Scala 2.10/2.11 still compiles with 2.13.

I think the biggest change for me was the redesigned collections-library, but that was rather simple migration.

That said; there are a few breaking changes with the migration to 3.0 - especially if you rely on unsupported features of the compiler, namely macros. Macros have been widely used in the past and will not be supported anymore.

Re: Java Is Underhyped

#108
post #47

Earlier quoted context omitted.

Verbosity is not a problem in large code bases. Speed of understanding and debugging of what somebody else wrote is. So, less magic is better. I will take Java codebase over Scala or Python every time, unless it is a toy script which is 100 lines

Every significant Java codebase I've worked in has had incredible amounts of magic. Between AOP, DI frameworks, APT, reflection, proxies, SPI, Lombok compiler hacks, dynamic classloaders, etc., there is a LOT of magic flying around and it can be quite hard to understand what will happen at runtime.

Don't forget XML DSLs. Or are we past that?

Re: Java Is Underhyped

#109

The sheer verbosity of Java is just unbearable when you're used to Python/Go/Swift/etc. No, Java is just about as hyped as it needs to be. Which is to say, it's more or less fine. Not great, not terrible. Middle of the road at best.

>The sheer verbosity of Java is just unbearable when you're used to Python/Go/Swift/etc.

I'm used to Python (and some Go) for decades, and the verbosity of Java is a non-issue to me.

I'd rather have the speed, type safety, and refactoring tools support, over Python... (not to mention the much better packaging situation).

I'd still prefer Python for smaller programs, basically because of the startup time and quick write/try cycle. But for larger stuff, I'm not so sold, and I've been doing them (in Python) for decades...

Re: Java Is Underhyped

#110
The amount of vitriol Java receives in the game development space is rather strong. However, whenever people dismiss Java as being a bad language, I can't help but think of Minecraft.

Yes, it's one of the few mainstream titles where Java has been successfully applied, but I believe Minecraft's success was specifically because it was written in Java.

With no JVM, there would have been no Minecraft mods at the level of flexibility that Forge provides, and the game would probably have stagnated in comparison with the sheer amount of community content from the past ten years that's available. Being able to use libraries like ASM that allow you to transform the compiled bytecode in radical ways were possible only because Minecraft targeted a virtual machine. The incredible thing was that this was in spite of the obfuscation Mojang applied to the compiled source. If it was possible to create a flexible mod system at all thanks to the JVM, people were just too motivated for any deterrence to stop them.

For the people who say that Minecraft should have been written in C++ or something from the start, because Java is a mediocre programming language, there's Bedrock Edition. Nobody I know cares about it enough to play it. For all its bloat and performance issues, the benefits of the JVM were simply too convincing.

Post reply on HN