4 ms·
So, I am definitely a fan of literate programming. I'm not sure I am a fan of what I will call the polyglot method, though. Specifically, I don't think I full
by taeric 12y ago
So, I am definitely a fan of literate programming. I'm not sure I am a fan of what I will call the polyglot method, though.
Specifically, I don't think I fully grok/agree with the utility of having a single file that is both a markdown file and a lua file through commenting. In the end, it means you are still greatly limited to the ordering semantics of the main language.
Which is not to say some folk won't do an amazing job writing a program. They clearly will. However, I think the macro approach of CWEB (or noweb, even) still has a lot of mileage that is overlooked nowdays.
- mhd 12y agoTotally agree, what we often see nowadays is still interesting, but mostly a "rich text comment" style. The two main factors for this are that such preprocessors are easier to write than weave/tangle systems, and that many people feel that in a modern idiom this isn't needed anyway. Shorter functions, no need for pre-declared variables, function hoisting, less global state... Not that this is totally wrong, working around the limitations of Pascal/C is one reason for the way Knuth's literate programming style was developed. The way I see it, the more simpler style is pretty good for a well-documented program that needs to be maintained, less so for a narrative that is a bit less focused, documenting the way something was initially written ("Let's add another field to our wibble_wobble structure to make wonk-gibbling work properly").