Function Quote by Rob Pike
“Procedure names should reflect what they do; function names should reflect what they return”
About This Quote
Source Book: The Practice of Programming, 1999
Names should describe behavior and outcomes clearly for readability and maintenance.
In simple terms: Names should describe what they do and return.
Choose descriptive names.
Themes
Mood
Type
When to use this quote
- code reviews
- team onboarding
- API design
- refactoring
Key Concepts
Questions to Reflect On
- How do you decide when a name is descriptive enough?
- What conventions help keep naming consistent?
Names alone cannot guarantee understandability without documentation.