3 ms·
If you have a look at, e.g., Plan 9 and Inferno, I think you might be surprised at how expressive a file-based API can be. For a trivial example, webfs support
by 1337p337 15y ago
If you have a look at, e.g., Plan 9 and Inferno, I think you might be surprised at how expressive a file-based API can be.
For a trivial example, webfs supports REST quite handily without a loss of expressive power (and REST itself is a simple but powerful abstraction), and because things need not be piped through curl, you can, for example, point your image editor at what it believes to just be another file on the filesystem, rather than requiring the image editor to support HTTP.
The other half of this is that abstractions can and are built atop this. The Limbo programming language, for example, provides typed channels (which, as I understand it, also made it into Go) and its standard library provides functions for treating arbitrary files as typed channels. So, the OS need only concern itself with "files" (really, in Plan 9 and Inferno, these are less like files and more like names in the processes' respective namespaces), and whatever complex objects the language concerns itself with are easy to ship around between a process and the outside world without hacks (unless marshalling objects is considered a hack).