- 论坛徽章:
- 0
|
Problems in the design of Unix
Prev Chapter 18. Futures
Next
Problems in the design of Unix
But are there serious problems with those basic abstractions? In chapter 1 (Philosophy) we
touched on several issues that Unix arguably got wrong. Now that the open-source
movement has put the design future of Unix back in the hands of programmers and technical
people, these are no longer decisions we have to live with forever. We'll take a look at them
in order to get a better handle on how Unix might evolve in the future.
A Unix file is just a big bag of bytes
A Unix file is just a big bag of bytes, with no other attributes. In particular, there is no
capability to store information about the file type or a pointer to an associated application
program out-of-band from the file's actual data.
More generally, everything is a byte stream; even hardware devices are byte streams. This
metaphor was a tremendous success of early Unix, and a real advance over a world in which
(for example) compiled programs could not produce output that could be fed back to the
compiler. Pipes and shell programming sprang from this metaphor.
But Unix's byte-stream metaphor is so central that Unix has trouble integrating software
objects with operations that don't fit neatly into the byte stream or file repertoire of
operations (create, open, read, write, delete). This is especially a problem for GUI objects
such as icons, windows, and 鈥榣ive鈥 |
|