Friday, March 1, 2013

Literate programming reprise

So Jeremy Ashkenas has a post on literate CoffeeScript, which is a feature of 1.5, apparently.  And he links to Knuth's own CWEB write-up of ADVENTURE, the original adventure game.

As always when reading Knuth, it makes me think.  One of the thoughts it provoked yesterday was this.  Literate programming as currently conceived has been criticized as not being sufficiently cognizant of the practice of reusability - which is true.  On the other hand, it might actually be nice to track the evolution of subroutines (say) from version to version as one's own skill and knowledge of a given domain grows.

In other words, reusability in the form of a library is also not the end goal.  You can kind of reconstruct the history of a concept in git.  Kind of.  I've never actually done it.  But it might be interesting to have some kind of index of code at (yeah) a semantic or descriptive level that explicitly makes it clear what it is supposed to do and how it reflects increasingly refined knowledge of the domain.

I'm having troubles articulating this.  Hopefully this flailing around will be enough for me to reconstruct the notion later.

No comments:

Post a Comment