>
Mr. Klabnik goes in depth into the argument that literate programming has to be tangled and weaved into a different order, in order to be considered "true" literate programming.> Respectfully, I have to disagree.
If you're not re-ordering the code, there's no difference between a "literate program" and simple comments.
And I find code-reordering useful even in modern languages; most impose some structure like:
1. module-level documentation
2. exports
3. imports / includes
4. implementation (functions, procedures, etc)
4.1 return type (static languages only)
4.2 function/procedure documentation
4.3 code
With literate programming, you can add supporting text (like export entries, module imports, or documentation) wherever would make the most sense for a human reader, not to the compiler.
> At any point where you're tempted to pull out a block of code and interpolate it later, just make it a function with a descriptive name, and hey presto.
What if you've got a few dozen local variables? Do you want to pass them all as parameters, for every single logical block in your algorithm?
What sort of names do you give your extracted procedures? Literate programs can have block names like "Check for common post-traversal error conditions", which in a procedure name would likely be abbreviated to "traversed_errcheck()".