3 ms·
I agree that Underscore's functions are simple/short enough that the commentary doesn't add much. However, do you still think that literate-style documentation
by jashkenas 16y ago
I agree that Underscore's functions are simple/short enough that the commentary doesn't add much. However, do you still think that literate-style documentation isn't helpful for more complicated modules like this one?
http://sstephenson.github.com/strscan-js http://sstephenson.github.com/strscan-js
Or, to take an extreme example -- this one:
http://jashkenas.github.com/coffee-script/documentation/docs/rewriter.html http://jashkenas.github.com/coffee-script/documentation/docs...
... where the code is very detail-oriented, and you need the commentary to convey the "what", and the "why" -- while the code explains the "how".
- jrockway 16y agoLiterate programming is useful, but not when the commentary is "the function createMeAFoo creates me a foo".