story
Writing and reading simple Go libraries is a breeze. I’ve written tiny libraries that fit in one file. You can read it linearly, starting at the top and following the logical progression of type declarations, functions, globals, etc.
Whereas with an identical Java library, a reader would be presented with several small files and have no idea where to start reading.
public class Wrapper {
public static class C1 { }
public static class C2 { }
}
//other module:
var x = new Wrapper.C1();The Go style just lets your code live together for easy reading, no problem. You can comfortably fit all of this into one file: a one-function interface, a couple of small functions that take the interface as a parameter, and two implementations of the interface.
Compare this to 3 or 4 tiny Java files. You’d have to guess which one to click on first.