Hacker News new | past | comments | ask | show | jobs | submit login

Java got async I/O in 2002, generics and "for (x : iterable)" in 2004, and lambdas in 2014. Vintage 2001 Java was drastically harder to read and slower, though error handling was always less cumbersome than Go.



It sounds like the point the person was trying to make was in use-case, rather than language semantics. As in, where one might've used Java before, they would now use Go. Not that Java and Go are semantically similar.


"error handling was always less cumbersome than Go" You mean useless stack traces 50 lines long?


You're free to filter any of that out, and the boilerplate that generated it doesn't obstruct your reading of useful code.


When did Java get versioned modules, value types, installable binaries, dynamic heap size?


Installable binaries, around 2000, when the first commercial JDKs started having AOT compilation to native code.

Currently available on PTC, Aicas, IBM, OpenJDK AppCDS (originally from BEA J/Rockit), GradleVM native images, Android ART AOT compilation.

Dynamic heap size, since ever. Every JDK vendor had their own specific switches to configure it.

Versioned modules, since Java 9 alongside Maven/Gradle.

Value types, yeah point taken. There were Azul and IBM specific extensions, ObjectLayout and PackedObjects respectively, and the 2nd experimental release for value types was just made recently available.


Except that in the real world no one use installable binaries and everyone is embedding 150MB of JRE / JDK.


If that would be the case, the companies that sell commercial JDKs would be out of business, and yet here they are, selling Java tooling since around 2000.

Maybe you are referring to the "real world" where developers don't pay for their tools.

As for embedding 150MB of JRE / JDK, it is hardly any different than embedding the Go's runtime into every static compiled executable.


Practically speaking this is a non-issue, since its not 1996 anymore. You install the JRE / JDK into your VM or container image. And you basically never think about it until you need to do an upgrade...


You have to stop using interfaces to avoid boxing your value types. Go should monomorphize functions.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: