[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | Languages |
Notice: | Speaking In Tongues |
Moderator: | TLE::TOKLAS::FELDMAN |
|
Created: | Sat Jan 25 1986 |
Last Modified: | Wed May 21 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 394 |
Total number of notes: | 2683 |
26.0. "LITERATE PROGRAMMING" by SYZYGY::SOPKA () Tue Sep 04 1984 00:37
In a recent issue of THE COMPUTER JOURNAL (Vol 27 #2), Donald Knuth
has published a paper titled "Literate Programming". In it he says:
"Let us change our traditional attitude to the construction
of programs: Instead of imagining that our main task is to instruct
a 'computer' what to do, let us concentrate rather on explaining
to 'human beings' what we want a computer to do.
"The practitioner of literate programming can be regarded as
an essayist, whose main concern is with exposition and excellence
of style. Such an author, with thesaurus in hand, chooses the
names of variables carefully and explains what each variable means.
He or she strives for a program that is comprehensible because its
concepts have been introduced in an order that is best for human
understanding, using a mixture of formal and informal methods
that nicely reinforce each other."
He goes on to describe a programming language system which he
calls WEB. "WEB itself is chiefly a combination of two other languages:
(1) a document formatting language and (2) a programming language.
. . . A WEB user writes a program that serves as the source language for
two different system routines. One line of processing is called 'weaving'
the web; it produces a document that describes the program clearly and
that facilitates program maintenance. The other line of processing is
called 'tangling' the web; it produces a machine executable program. The
program and its documentation are both generated from the same source,
so they are consistent with other."
The prototype system he has developed and which he uses in this
paper to describe his concept of Literate Programming is based on TEX
as the document formatting language and on PASCAL as the programming
language. He does claim, however, that "the same principles would apply
equally well if other languages were substituted." To support this
claim he references a report on the development of "CWEB, based on
Troff/Nroff and C instead of TEX and PASCAL."
Beyond discussion of the philosophy and design of WEB, the
paper includes:
1.) the details of a WEB program to compute prime numbers;
2.) the applicability of Occam's Razor to WEB;
3.) discussion of issues involved in the portability of WEB;
Finally, he concludes:
"I made a concious decision not to design a language that
would be suitable for everybody. My goal was to provide a tool
for systems programmers. . .[but it] may be only for the subset
of computer scientists who like to write and to explain what
they are doing. My hope is that the ability to make explan-
ations more natural will cause more programmers to discover
the joys of literate programming."
This seems to emphasize an axis of concern which is orthogonal
to those usually discussed in the design of programming languages.
Pick up a copy at your local technical library and decide for yourself
whether this is bound to become an important reference work in programming
language design or is just another unrealistic, academic's pipe dream.
T.R | Title | User | Personal Name | Date | Lines
|
---|