Re:Response to “Literate programming considered harmful”
by panic on Wednesday August 31, 2016 @08:28AM
(#12397749)
It's ultimately subjective, but I think that code is readable: the variables are well-named and each line says exactly what it does. Abstraction makes it easier for you to think you understand what the code is doing, but if you want to really understand what's going on, you also have to understand how the abstraction is implemented. Straightforward code like this can be understood directly, without having to dig through layers of function calls.
[ Parent
| on HN ]
Re:Response to “Literate programming considered harmful”
by catnaroek on Wednesday August 31, 2016 @08:42AM
(#12397839)
If you think that code is readable, could you correctly write all pre/post-conditions in between statements?
Re:Response to “Literate programming considered harmful”
by panic on Wednesday August 31, 2016 @09:20AM
(#12398050)
I think that's a little different. Reading code almost never involves analyzing it to that degree. Usually you're just trying to figure out what part is broken or where you need to add some new functionality.