Hacker News new | ask | show | jobs
by namelezz 3596 days ago
> This is a huge improvement over Java, and something every language should have an option for.

I am not sure what improvement you are talking about. Deploying Go apps requires recompiling for the target platform. On JVM, you only need to install the JVM. There are also tools to wrap JVM apps in executable files that will automatically download and install a suitable JVM.

1 comments

I'm specifically talking about the classpath, jars, separate jvm install. These are a pain to manage across environments.

I'm a longtime Java engineer, it's a great language, but I do think the compile once thing isn't as big an advantage anymore.

With the advent of the LLVM, it's easy to target specific machines. rustup, even makes it possible to build binaries for every target environment you have.

And let's be honest, how many people target more than Linux/x86_64 on the server side? Even if you target FreeBSD or Windows, my bet is that your still generally only targeting one platform.

Btw, Rust has a great std lib that is very portable across all major platforms. https://doc.rust-lang.org/book/getting-started.html

Java is battle-hardened and has seen almost every situation in the business programming. Go has miles to go before it can even be eligible to be compared to Java in terms of productivity and maintainability.
Fair enough about having to install a JVM separately. In my experience, it isn't a huge deal, but it's certainly a nonzero-sized deal.

But the classpath and jars? Write your application, 'gradle distZip', copy zip to target and unzip, invoke the launch script Gradle generated, done.

And if you can't be bothered to unzip, there's: https://github.com/pivotal/executable-dist-plugin

> I'm specifically talking about the classpath, jars, separate jvm install. These are a pain to manage across environments.

I agree with the classpath issue and hopefully it will be fix in Java 9. Separate jvm install? Why? JVM is backwards compatibility.

> And let's be honest, how many people target more than Linux/x86_64 on the server side.

Those that develop non server apps since Java is a general-purpose language.

Yes. I'm serverside generally.

The JVM is, but sometimes there are things that require specific bug fixes in the GC for example where it's just a big issue combining the jars with the JVM etc.

My only put is that a single thing to deploy is easier than multiple.

> I'm a longtime Java engineer, it's a great language, but I do think the compile once thing isn't as big an advantage anymore.

So you surely should be aware of the existing options to compile Java to native code, just like Go.