Prompt
Choose clear, descriptive names for variables, methods, types, and parameters that unambiguously convey their purpose and avoid conflicts. Prefer full words over abbreviations and ensure names are specific enough to prevent clashes with inherited or similar functionality.
Examples of improvements:
- Use
optionsinstead ofoptsfor better clarity - Use
TransportTypeinstead ofProtocolwhen the term “protocol” is overloaded in the domain - Use
onMcpErrorinstead ofonErrorto avoid conflicts with base class methods
This practice reduces cognitive load, prevents naming conflicts during inheritance or composition, and makes code more maintainable by clearly expressing intent through naming.