5

I have been trying to figure out what Donald Knuth's WEB is, but it is really conflicting. From what I can glean from the web page is that it's something like doxygen, but all of the sources I am reading insist that it is a programming language. However, it does not look like any programming language I have ever seen.

So what exactly is WEB? Is there some set of documentation that explains it?

HSchmale
  • 1,541
  • 2
  • 17
  • 40
  • 5
    WEB is Pascal + macros to make Pascal better + TeX for documentation. CWEB is the same, except with C instead of Pascal. As these are the basis of an entire programming paradigm (literate programming) rather than simply writing code and considering documentation secondarily, the sources (and Knuth) call it a programming language. Also, Pascal-extended-with-macros is arguably a different language from Pascal, especially to someone like Knuth who has written a lot of compilers and knows enough about the history of programming languages. – ShreevatsaR Jun 13 '17 at 13:42
  • @ShreevatsaR that's a much better answer. – HSchmale Jun 14 '17 at 23:20
  • 1
    I don't know why this question got downvoted (save absurdist elitism); even a PLT nerd like me might balk at the (then-more-accurate) description of Web as a ‘programming language’ by modern standards. To boot, it's a name that's incredibly hard to Google. Good question, well-answered for newcomers by @ShreevatsaR. – ELLIOTTCABLE Aug 31 '17 at 07:01
  • 1
    To be precise WEB is _Standard_ Pascal with macros (and documentation). Standard Pascal is so limited in what you can do as a programmer so in hidnsight it was inevitable that a preprocessor would be written. Knuth just took it to eleven. – Thorbjørn Ravn Andersen Feb 26 '19 at 09:54

1 Answers1

0

Surprising question as nothing like a quick search can't find easily:

From the Wikipedia page at https://en.wikipedia.org/wiki/WEB:

WEB is a computer programming system created by Donald E. Knuth as the first implementation of what he called "literate programming": the idea that one could create software as works of literature, by embedding source code inside descriptive text, rather than the reverse (as is common practice in most programming languages), in an order that is convenient for exposition to human readers, rather than in the order demanded by the compiler.

WEB consists of two secondary programs: TANGLE, which produces compilable Pascal code from the source texts, and WEAVE, which produces nicely-formatted, printable documentation using TeX.

CWEB is a version of WEB for the C programming language, while noweb is a separate literate programming tool, which is inspired by WEB (as reflected in the name) and which is language agnostic.

The most significant programs written in WEB are TeX and Metafont. Modern TeX distributions use another program Web2C to convert WEB source to C.

More info in the highly recommended book from the author:

Literate Programming (Center for the Study of Language and Information - Lecture Notes) Paperback – June 1, 1992

ISBN-13: 978-0937073803 ISBN-10: 0937073806

Check the reviews for the book at Amazon.com or better yet, buy the book and start reading.

Laurent
  • 4,904
  • 4
  • 36
  • 64
  • 2
    I don't consider this to be a real answer since the link in the (unedited) question demonstrates OP was already quite familiar with the contents of the Wikipedia page, and was asking for further explanation. I'll admit the book reference helps a bit, though. – silvascientist Jun 04 '18 at 02:52