Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
sameoldtune
7 months ago
|
parent
|
context
|
favorite
| on:
If Inheritance is so bad, why does everyone use it...
You’re describing the strategy pattern, which is probably one of the most practical coding design patterns. Ex: each chess AI difficulty gets its own class, which all extend a common interface.
krapht
7 months ago
[–]
I still find it funny that somehow the idea of runtime function dispatch via function pointer is called the "strategy" pattern.
sameoldtune
7 months ago
|
parent
[–]
Hey I didn’t name it!
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: