What the heck is this "WEB" thing?

One should never mix the term "WEB" for the programming environment, and the short "Web" for WWW.
"The philosophy behind WEB is that an experienced system programmer, who wants to provide the best possible documentation of his or her software products, needs two things simultaneously: a language like TeX for formatting, and a language like C for programming. Neither type of language can provide the best documentation by itself; but when both are appropriately combined, we obtain a system that is much more useful than either language separately.

The structure of a software program may be thought of as a "web" that is made up of many interconnected pieces. To document such a program we want to explain each individual part of the web and how it relates to its neighbours. The typographic tools provided by TeX give us an opportunity to explain the local structure of each part by making that structure visible, and the programming tools provided by languages such as C or Fortran make it possible for us to specify the algorithms formally and unambigously. By combining the two, we can develop a style of programming that maximizes our ability to perceive the structure of a complex piece of software, and at the same time the documented programs can be mechanically translated into a working software system that matches the documentation."

[Taken from the CWEB User's Manual, version 3.0 (1993)]

More technically, a WEB system consists of two processors, called WEAVE and TANGLE. They can be quite different, though, for different WEB environments. They both act on the WEB document in their own ways:

WEAVE "weaves" the document for a human reader, producing TeX output.

TANGLE "tangles" the document for a computer, producing a plain programming language file to be compiled, linked and executed [in CWEB and FWEB, the WEB document itself can be debugged since TANGLE automatically inserts "#line" labels for the debugger].

It must be emphasized that WEB and its variants are not the only environments for Literate Programming. See also other LitProg tools.


Marcus Speh
<marcus@x4u.desy.de>