Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

- Native build system

- Auto-formatting

- Good first-party testing and benchmarking

- Ppprof runs circles around VisualVM

All these things are available for Java (MVN/Gradle, JUnit, IDEA, YourKit, etc) but having one right way to do them built in is pretty great.

On a meta level, combination of the AST package and deterministic code formatting means it's relatively easy to write programs that manipulate source code.



> All these things are available for Java (MVN/Gradle, JUnit, IDEA, YourKit, etc) but having one right way to do them built in is pretty great.

It's great if you're just starting out, but it's irrelevant in the long run. It can even be harmful when it's coupled with the language, as you get things like having the packaging tool become deprecated, like with go dep, since a 3rd party tool can't compete with a first party tool for adoption, especially in a relatively young language like Go.

For pprof vs VisualVM - I haven't yet done a lot of CPU profiling with them, but for memory I have had the exact opposite experience. VisualVM and Eclipse MAT are much easier to understand and have much more functionality for analyzing the memory of a Java process than pprof offers.

Not sure what (pseudo-)deterministic code formatting has to do with the ease of manipulating program code, but having a built-in AST package is indeed a good idea. Too bad it hasn't been used to write any useful refactoring tools for Go (outside of JetBrains Goland? Haven't tried that yet). I have heard that Google uses go fix recipes to make modifications across their code base, but haven't seen any examples, and I doubt it can realistically be done in a code base that is not ridiculously well tested, and that it didn't require any manual intervention in a few corner cases in Google as well (assuming they did more than a rename).


I’ve written a a few, all internal sadly. Deterministic formatting is important because you can manipulate the AST and then just call “print” and get a nice diff. Without that it would rewrite entire files.


Just a nit, Java Microbenchmark Harness is apart of OpenJDK so it is "first-party".


Oh good point. We're on Java 8 and migrating to 11...


I've been enjoying the standard library improvements in 11. The http and websocket clients are pretty easy to use.




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

Search: