Literate Programming - Concept

Concept

A literate program is an explanation of the program logic in a natural language, such as English, interspersed with snippets of macros and traditional source code. Macros in a literate source file are simply title-like or explanatory phrases in a human language that describe human abstractions created while solving the programming problem, and hiding chunks of code or lower-level macros. These macros are similar to the algorithms in pseudocode typically used in teaching computer science. These arbitrary explanatory phrases become precise new operators, created on the fly by the programmer, forming a meta-language on top of the underlying programming language.

A preprocessor is used to substitute arbitrary hierarchies, or rather "interconnected 'webs' of macros", to produce the compilable source code with one command ("tangle"), and documentation with another ("weave"). The preprocessor also provides an ability to write out the content of the macros and to add to already created macros in any place in the text of the literate program source file, thereby disposing of the need to keep in mind the restrictions imposed by traditional programming languages or to interrupt the flow of thought.

Read more about this topic:  Literate Programming

Famous quotes containing the word concept:

    Modern man, if he dared to be articulate about his concept of heaven, would describe a vision which would look like the biggest department store in the world, showing new things and gadgets, and himself having plenty of money with which to buy them. He would wander around open-mouthed in this heaven of gadgets and commodities, provided only that there were ever more and newer things to buy, and perhaps that his neighbors were just a little less privileged than he.
    Erich Fromm (1900–1980)

    There is a concept that is the corrupter and destroyer of all others. I speak not of Evil, whose limited empire is that of ethics; I speak of the infinite.
    Jorge Luis Borges (1899–1986)

    The latest creed that has to be believed
    And entered in our childish catechism
    Is that the All’s a concept self-conceived,
    Which is no more than good old Pantheism.
    Robert Frost (1874–1963)