ENTRYPOINT comments
I think it would be a good idea for all projects to include // ENTRYPOINT
comments near all top-level entry points to the program (main
, top-level event handlers, routes).
To people unfamiliar with the language or framework it is often not clear where the entrypoints are, and following entrypoints logically is often one of the only good strategies available for figuring out what a piece of code does or how a piece of functionality is implemented.
IDEs already have functionality for displaying TODO
and FIXME
comments, so it wouldn’t be too time-consuming for them to include an optional entry points widget displaying an overview of the project’s entry points.