[Solved]: What are examples of inconsistency and incompleteness in Unix/C?

Problem Detail: 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

  • 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 to drop those parts of the design that deal with less common circumstances than to introduce either implementational complexity or inconsistency.
  • Completeness — the design must cover as many important situations as is practical. All reasonably expected cases should be covered. Completeness can be sacrificed in favor of any other quality. In fact, completeness must be sacrificed whenever implementation simplicity is jeopardized. Consistency can be sacrificed to achieve completeness if simplicity is retained; especially worthless is consistency of interface.

Please note I am not asking whether Gabriel is right (which is a question not appropriate for StackExchange) but for examples of what he might have been referring to.

Asked By : espertus

Answered By : Bruce Ediger

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: 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.
Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/1280

Leave a Reply