patternModerate
What are examples of inconsistency and incompleteness in Unix/C?
Viewed 0 times
unixwhatareincompletenessinconsistencyexamplesand
Problem
In Richard Gabriel's famous essay The Rise of Worse is Better, he contrasts caricatured versions of the MIT/Stanford (Lisp) and New Jersey (C/Unix) design philosophies along the axes of simplicity, correctness, consistency, and completeness. He gives the example of the "PC loser-ing problem" (discussed elsewhere by Josh Haberman) to argue that Unix prioritizes simplicity of implementation over simplicity of interface.
One other example I've come up with is the different approaches to numbers. Lisp can represent arbitrarily large numbers (up to the size of memory), while C limits numbers to a fixed number of bits (typically 32-64). I think this illustrates the correctness axis.
What are some examples for consistency and completeness? Here are all of Gabriel's descriptions (which he admits are caricatures):
The MIT/Stanford approach
The New Jersey Approach
One other example I've come up with is the different approaches to numbers. Lisp can represent arbitrarily large numbers (up to the size of memory), while C limits numbers to a fixed number of bits (typically 32-64). I think this illustrates the correctness axis.
What are some examples for consistency and completeness? Here are all of Gabriel's descriptions (which he admits are caricatures):
The MIT/Stanford approach
- Simplicity -- the design must be simple, both in implementation and interface. It is more important for the interface to be simple than the implementation.
- Correctness -- the design must be correct in all observable aspects. Incorrectness is simply not allowed.
- Consistency -- the design must not be inconsistent. A design is allowed to be slightly less simple and less complete to avoid inconsistency. Consistency is as important as correctness.
- Completeness -- the design must cover as many important situations as is practical. All reasonably expected cases must be covered. Simplicity is not allowed to overly reduce completeness.
The New Jersey Approach
- Simplicity -- the design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface. Simplicity is the most important consideration in a design.
- Correctness -- the design must be correct in all observable aspects. It is slightly better to be simple than correct.
- Consistency -- the design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases, but it is better
Solution
The question's title suggests that some basic user interface inconsistencies may interest you:
Unix commands don't follow any particular syntax for specifying options and flags. For example, most commands use single letters preceded by '-' as flag:
Unix and its descendants and relatives have multiple slightly different regular expression syntaxes. Shells use "" where other programs (grep, egrep, vi) use '.'. egrep has '+' and '|' as operators, grep does not.
The basic "everything is a file" system call interface could be viewed as incomplete: read/write/seek/close doesn't fit every I/O device. Badly needed exceptions get lumped into "ioctl" calls, but devices like sound cards don't even fit that very well.
Unix commands don't follow any particular syntax for specifying options and flags. For example, most commands use single letters preceded by '-' as flag:
cat -n some_file, but exceptions like tar tf some_file.tar and dd in=some_file out=some_other_file count=2 exist in commonly used commands.Unix and its descendants and relatives have multiple slightly different regular expression syntaxes. Shells use "" where other programs (grep, egrep, vi) use '.'. egrep has '+' and '|' as operators, grep does not.
The basic "everything is a file" system call interface could be viewed as incomplete: read/write/seek/close doesn't fit every I/O device. Badly needed exceptions get lumped into "ioctl" calls, but devices like sound cards don't even fit that very well.
Context
StackExchange Computer Science Q#1280, answer score: 16
Revisions (0)
No revisions yet.