4 ms·
awesome, could this be the start of Knuth's literate programming for the 21st-century web world? http://www-cs-faculty.stanford.edu/~knuth/lp.html http://www-c
by pgbovine 17y ago
awesome, could this be the start of Knuth's literate programming for the 21st-century web world?
http://www-cs-faculty.stanford.edu/~knuth/lp.html http://www-cs-faculty.stanford.edu/~knuth/lp.html
http://en.wikipedia.org/wiki/Literate_programming http://en.wikipedia.org/wiki/Literate_programming
- ash 17y agoYeah, that's exactly what I thought. By the way, docco is behind this: http://jashkenas.github.com/docco/ http://jashkenas.github.com/docco/ (again pointed by http://tomayko.com/linkings/9f266cc6a6118995e75ffb963a7dce3e http://tomayko.com/linkings/9f266cc6a6118995e75ffb963a7dce3e)
- jongraehl 17y agoNo. Knuth's literate programming had the source code presented out of order (in whatever order the explanatory text desired).
- jashkenas 17y agoActually yes, because of JavaScript/CoffeeScript's habit of pushing declarations up before evaluation, you can more or less lay out your code in any order. We take advantage of this in the Lexer, here... http://jashkenas.github.com/coffee-script/documentation/docs/lexer.html http://jashkenas.github.com/coffee-script/documentation/docs... ...to stash all of the regex matchers down at the bottom of the file, even though the functions that make use of them come first.