Everything Isa File

The concept on *IX file systems that everything, including system devices, are files. For one, this makes it much easier to programmatically address any object on an *IX system. -- JonMadison

PlanNineFromBellLabs takes this concept much further than any backwards Unix. But it doesn't matter since everything is a file is an inherently backwards criterion owing its usefulness to backwards languages (C/C++) and backwards communications protocols (TCP/IP)­.

A system with a modern language like SmalltalkLanguage, and modern distribution protocols (SOAP) replaces the backwards "everything is a file" with the more sensible Everything Is An OBJECT.

Everything is a file is a crutch for systems that simply aren't OO in any way, shape or form, but want to buy into some of the advantages of OO. Everything is a file is "everything is an object" for retards who haven't joined the 1980s, never mind the 21st century. -- rk

To get the historical details right: it was a reaction to the older universal approach of having multiple incompatible file types (ISAM etc), each of which required a completely different method of programming in order to just plain read and write them. Typically a different COPY program was required per file type.

What it accomplished, back then, was to make the OS interface polymorphic, by having just one type of file (a stream of bytes), and if further structure (e.g. ISAM) was desired, then individual application programs could layer that on top of a byte stream.

So it had nothing to do with the language nor with communication protocols; it had only to do with fixing an older problem with filesystems themselves.

Modern operating systems that do what you desire: treating files as object streams (actually only NextOS did that, as far as I know), do this again by layering on type of the byte stream, not by taking the backward step of making all files incompatible again.

Here's the test: can a COPY utility ("cp", in Unix) be trivially written to read and write files, no matter what objects they are composed of? This should, of course, be possible. Next test: does it require the OS itself to be aware of the object's definition? If so, that's a design smell; information hiding should mean that I should be able to keep my objects private, and not have to explain them to the OS.

-- DougMerritt

Your comments explain the situation with early Unices. However, PlanNineFromBellLabs was made in the 1990s, long after Smalltalk-80 had come around. I still say that DennisRitchie is an idiot who missed out on OO under the excuse of creating a perfect Unix long after Unix had become completely obsolete.

It's completely irrelevant to me whether you can write a trivial copy program for trivial objects. What matters is being able to clone objects no matter how complex they are.

An object is a subgraph of the total graph. The object graph is completely general; it can describe ANYTHING. This is NOT the case with mere streams of bytes. Therefore, streams of bytes are retarded.

If you're smart, you build your classes on top of the object graph because then your objects can be anything. You don't need to explain your objects to the OS because "subgraph of the graph" is all it needs to know. There is NO excuse for settling for flat streams of bytes. -- rk

Terminology question: you're using the term "the object graph" as if it is capitalized; which page should I look at to refresh my memory of what you are referring to? -- ?

The object graph is just the directed graph of object references. This includes whatever special features (like PermissionFlags) you build into the object references. It's a term used by the e-rights people in their pages, though they include no special features at all.

Back to bytestreams. Not only are bytestreams primitive, not sufficiently general and powerful, but they're also horribly inelegant. This is because bytestreams are an incredibly special special case.

Think about it. You've got your basic operations on a node; add a named vertex, replace the vertex associated with a name, remove a named vertex­. So how do the typical file operations map to them?

The first two are completely arbitrary (read: retarded, for retards by retards) limitations on bytestreams. The third is only a bit more complicated. The last is something else entirely. It's a fundamental limitation of bytestreams that they are contiguous. Remove that limitation, generalize bytestreams, and you've got a completely different data structure. One I plan to build into my object graph as a special case.

In GrandUnifiedCapabilities, I will use no bytestreams. I will use sets of byte spans. They're the null vertices in nodes. -- rk


EditText of this page (last edited May 28, 2004) or FindPage with title or text search