Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I came here to post exactly that. He says 'well this makes me re-think self-documenting code', when in reality writing readable code would have provided all of the documentation necessary. I don't get his point.


For 10 lines of code, a meaningful function name might be enough documentation. But suppose instead of a 10-line function the same code were 10 lines inside a 100-line function. Then you'd need a comment. (It would be better to break it out as its own function, but suppose it were not so easy to factor out.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: