3 ms·
> Literate programs are essays. They might be easy to read and reason about, but not modify or extend. What's your rationale behind that last part? Have you ev
by Jtsummers 7y ago
> Literate programs are essays. They might be easy to read and reason about, but not modify or extend.
What's your rationale behind that last part? Have you ever used any notebook-styled interface like with Mathematica or Jupyter? It's perfectly feasible to tear out a chunk of material and replace it with something else, if you've organized it well. This is no different than the same constraint for conventionally written software. You can't easily refactor shitty code. You can't easily refactor shitty literate code. If you organize your code well and write quality code, whether in the literate or conventional style, you can refactor it with relative ease.
> A computer program is not best understood and managed as a linear artifact. Much of it's power is in graph nature.
And how does that conflict with literate programming? Literate programming permits the reorganization of code into any arbitrary structure. Which means that the graphical nature of the code can be made even more obvious than in most conventional languages. You're no longer bound by single-module files (see Java) or other arbitrary textual constraints. You can place the code in the place that makes the most sense for explication. Or put it adjacent to where it's used, even if it ends up tangled in a different file.