9 Programming Hold Still, This Won’t Hurt a Bit “Do not meddle in the affairs of Unix, for it is subtle and quick to core dump.” —Anonymous If you learned about programming by writing C on a Unix box, then you may find this chapter a little mind-bending at first. The sad fact is that Unix has so completely taken over the worldwide computer science educational establishment that few of today’s students realize that Unix’s blunders are not, in fact, sound design decisions. For example, one Unix lover made the following statement when defend- ing Unix and C against our claims that there are far more powerful lan- guages than C and that these languages come with much more powerful and productive programming environments than Unix provides: Date: 1991 Nov 9 From: tmb@ai.mit.edu (Thomas M. Breuel) It is true that languages like Scheme, Smalltalk, and Common Lisp come with powerful programming environments.
174 Programming However, the Unix kernels, shell, and C language taken together address some large-scale issues that are not handled well (or are often not even addressed) in those languages and environments. Examples of such large-scale issues are certain aspects of memory management and locality (through process creation and exit), persis- tency (using files as data structures), parallelism (by means of pipes, processes, and IPC), protection and recovery (through separate address spaces), and human editable data representations (text). From a practical point of view, these are handled quite well in the Unix environment. Thomas Breuel credits Unix with one approach to solving the complicated problems of computer science. Fortunately, this is not the approach that other sciences have used for solving problems posed by the human condi- tion. Date: Tue, 12 Nov 91 11:36:04 -0500 From: markf@altdorf.ai.mit.edu To: UNIX-HATERS Subject: Random Unix similes Treating memory management through process creation and exit is like medicine treating illness through living and dying, i.e., it is ignoring the problem. Having Unix files (i.e., the Bag O’ Bytes) be your sole interface to persistency is like throwing everything you own into your closet and hoping that you can find what you want when you need it (which, unfortunately, is what I do). Parallelism through pipes, processes, and IPC? Unix process over- head is so high that this is not a significant source of parallelism. It is like an employer solving a personnel shortage by asking his employ- ees to have more children. Yep, Unix can sure handle text. It can also handle text. Oh, by the way, did I mention that Unix is good at handling text? —Mark
Previous Page Next Page