Skip to content

Comment on The Best Code Documentation ‘Tool’ Ever Made

Comments

The method comments are where you explain the expected/accepted inputs and outputs. Its not for outlining design decisions. You also don't need to explain how the method works. It's a black box.

Your ide can be configured to show warnings if your comments don't match your parameter list. Though generally you don't change the external api of your code once you've written it. Or else you then have to update all the methods that call it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.