6.2 Inline Documentation
Inline documentation includes all comments and documentation that are embedded directly in the source code of an application. This type of documentation helps to make the code easier to understand as you read it.
You should use inline comments if you want to explain individual sections of code. They are mainly used for complex code sections that are difficult to understand. A typical example is a code passage that isn’t intuitive. If you’ve implemented a part of the business logic in such a way that it works but doesn’t correspond to the code standard of your application, you should comment on this. If you were to adapt the code accordingly, the logic would no longer work as desired. To prevent you or another person ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access