[TUHS] Unix APIs: elegant or not?

Bakul Shah bakul at bitblocks.com
Mon Nov 5 04:52:25 AEST 2018

> On Nov 4, 2018, at 2:53 AM, Chris Hanson <cmhanson at eschatologist.net> wrote:
>> On Nov 1, 2018, at 3:20 AM, Dave Horsfall <dave at horsfall.org> wrote:
>> With Unix, everything looks like a file, but as I said, the sockets API broke that convention, forcing users to work at a much lower level than necessary.
> This was broken from the start though, and always really meant everything looks like a file *descriptor*, not a path in the filesystem.

A “file” descriptor is very much like a capability, a handle.
This is separate from hierarchical naming intended for humans.
They are both needed. An ability to name something doesn’t
give you an automatic right to access it. And you don’t always
need to name something. For instance creating a pipe. The
third feature was capturing IO operations to a rather diverse set
of devices and files in a relatively simple interface. The fourth
feature that first attracted me first to Unix was its simple scheme
of major, minor device numbers. The “elegance” of Unix was that
you could get a lot done using a few abstractions. They were not
perfect but were good enough for the most part.

More information about the TUHS mailing list