11 - Comments
Single-line comments (//
) and multi-line comments (/*...*/
) are possible.
Comments are recommended as in-line documentation of what contracts, functions, variables, expressions, control and data flow are expected to do as per the implementation, and any assumptions/invariants made/needed.
They help in readability and maintainability.
- Inline Comments
- Single Line:
//
- Multi-line:
/* .. */
- Implement -> Documentation
- Assumptions/Invariants
- Affects
- Readability
- Maintainability