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.
Oh boy, it is used, starting by application servers.
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.