|
|
|
|
|
by dnesteruk
3933 days ago
|
|
Looking at the HTML output, I'm not sure this consitutes proper literal programming due to the amounts of 'contextual noise' that the processor generates. I think the goal is to have the program read more or less like a book, and this... {Print "hello world" 2} ≡ printf("Hello world");
This code is used in section 1. ...is not exactly it. It feels more like program-in-program Matrixy thing than a document to be read. |
|
Of course, there are advantages of Literate's output compared with CWEB's; it's more flexible in that you can embed arbitrary HTML in the output, so you can easily put images into your explanations, and you can put as many code blocks and text blocks as you like in each paragraph.