Hacker News new | ask | show | jobs
by pjmlp 1317 days ago
While a great idea, Java and .NET did it first, on their standard libraries.
2 comments

The Java version is much harder to implement than the go version.

FileSystem.Java: 12 abstract methods

FileStore.Java: 10 abstract methods

FileSystemProvider.java: 17 abstract methods

Total: 39 abstract methods

And having read through it, I’m still not sure what the role of these three systems are precisely. And there are more involved classes I ignored

Vs

fs.FS: 1 method

fs.File: 3 methods

fs.FileInfo: 6 methods

Total: 10

That’s 4 times less work for the developer. And 4 times less learning for users.

And it took me less time to look this up, and it’s abundantly clear that there is nothing I am missing here.

Generally in Go interfaces are much simpler than their Java equivalent.

In fact I’ll go further. The Java solution is so complicated that it is basically unused in practice.

It is more complicated, because it covers much more use cases, instead of just the basic.

Oh boy, it is used, starting by application servers.

so?
Like in most things, Go keeps catching up with modern language ecosystems.
I sense an air of derision, so I'll leave you with this: A lion ain't shit but a snack for three.