Rethinking Code Comments

Justin Duke has floated an intriguing idea: what if code comments worked like footnotes? In his mockup, every comment is hidden by default and only appears after a deliberate click.

That design is appealing because many comments are not meant for constant reading. They act more like future reminders — "this needs work" or "this is hacky, apologies." Keeping them tucked away makes a file far easier to scan end to end.

One open question is whether a global toggle should exist to expose every comment at once, rather than forcing readers to click through one by one when they want the full sequence in context.

The discussion inevitably leads back to why comments are so difficult to get right in the first place — a topic Sarah Drasner covered in depth at JSConf this year. Her talk remains a fantastic reference for anyone wrestling with the problem.