Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
gboyer
· 14y ago · 0 comments
You can just do both, though. Use interfaces for polymorphism, to define the interactions between your objects -- and then, if you want, use inheritance as one possible strategy for code reuse.
Comments
[–]
colomon
14y ago
That works great if you're only using one interface in your class. What if you need to include two?
[–]
gboyer
OP
14y ago
Then you use a different reuse strategy, like composition. The language is not ideal in this regard, certainly.