It's a cool idea, but I am struggling to understand why this is better than say BDD; which not only effectively documents what your code does but also verifies it does what it says it should do.
Like the comments newbies sometimes make in code
//Assign 0 to i
i = 0;
Whereas with literate programming you can explain why you went with a particular style of code, why you went with a particular datastructure, etc. You can build up a narrative of code that will help the next programmer who comes along.Edit: Having thought about it for a second, this could easily be done in most languages (with some preprocessing to strip out for deployment. Super easy in C-based languages). Not a convention I see anyone follow, though.
###
@it should return true
expect(foo()).to.be.true
###
foo = -> true
and the preprocessor extracts the test from the comment and associates it with the foo declaration.