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

Annoyingly it pushes the type definitions away from the function body when you have a particularly long doc. It’s a cute trick but docs above would have been better.


You know what's cool: IDEs. They can do block folding. The really good ones just auto-fold function docs because you don't need to see those until you do.

It's not just a good trick: it's the right way to do it, and tooling can be (trivially) made to show you only what you need to see until you need to see more.


If we’re assuming an IDE that can arbitrarily change text layout and rendering I don’t see why it matters where the comment goes




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: