Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
shubhamharnal
· 6y ago · 0 comments
Dart solves this quite elegantly using mixins.
https://dart.dev/guides/language/language-tour#adding-featur...
Comments
[–]
mwcremer
6y ago
I'm not sure that it does? From the c2 example, the goal is to have all Shapes respond to area() and perimeter(), but in the example you linked to, only Musicians will respond to entertainMe(), not all Performers.