Self-documenting code is a myth. Code only communicates action, not intent. Nor does it communicate assumptions about input constraints.
-
-
@paulg Haha, touché. Now try it for any non-trivial function. -
@mojombo Twitter won't let me indent, but (def some (f xs) (if (no xs) nil (f (car xs)) xs (some f (cdr xs)))) -
@paulg As a non-LISP native, I bet a simple code comment on that would get me to comprehension much faster. =) -
@mojombo You raise an interesting point, which is that code, like writing, has an intended audience. -
@paulg Yes! But there is also a temporal component. What is obvious to the coder NOW may be very much non-obvious to a reader years later. -
@mojombo@paulg My favorite reason to write documentation: http://docs.writethedocs.org/writing/beginners-guide-to-docs/#you-will-be-using-your-code-in-6-months … -
@ericholscher@paulg Yes, absolutely! Think of your future self! -
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.