Objects Quote by Eric Freeman
““methods in objects are properties too. They just happen to have a function assigned to them.””
About This Quote
Source Book: Head First Design Patterns, 2004
Objects have properties that can be functions, blurring the line between data and behavior.
In simple terms: Objects can hold functions as properties.
Leverage functions as object properties.
Themes
Mood
Type
When to use this quote
- API design
- code refactoring
- software architecture
Key Concepts
Questions to Reflect On
- How does this affect code readability?
- When should you use function properties?
May confuse beginners unfamiliar with concepts.